|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-04-25 18:54 UTC] colder@php.net
[2008-04-30 13:34 UTC] vmarsik at suse dot cz
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 13:00:01 2025 UTC |
Description: ------------ $result = mysql_query($sql) or die( mysql_error() ); - works OK $result = mysql_query($sql) or return( null ); - Parse error: syntax error, unexpected T_RETURN in xx.php on line 24 $result = mysql_query($sql) or $ret = null; - works OK $result = mysql_query($sql) or { $ret = null; return $ret; }; - Parse error: syntax error, unexpected '{' in xx.php on line 24 The second version should behave exactly as the first one. The fourth probably as well. Also applies to '||', which behaves exactly as 'or'.