what would make this if decision carry out what's in the braces?

madenough

New Member
I have tried everything to try understand what the \[code\]if\[/code\] part of this statement truly accomplishes. It appears that no value that can be assigned to $_var will actually make the \[code\]if\[/code\] statement carryout what's inside the braces. Can someone help me to understand why someone would use this \[code\]if\[/code\] syntax in production code? \[code\]<?php$_var=true;if(!$_var =func() ) {echo 'returning false';//never prints!? }echo $_var;function func(){ echo 'test';return 3;} ?>\[/code\]
 
Back
Top