Well, being alone, assignment in a logical operator is not so bad:
if ($id = $_GET['id']) {
or
while($row = mysql_fetch_assoc($res)) {
we use quite often.
Although he is still in danger of reading or mixing the = and == operators.
But mixing logical and assigning operators in one statement is bad. This is called obfuscation and perl write-only style, which makes reading this code more difficult.
So, it is better to write in the form
if(isset($_POST)) { $post = $_POST; print_r($post); }
although this particular statement is pretty pointless. $ _POST is always set in any reasonable environment and assigns it to another variable, which is not required in most cases
source share