Edit report at https://bugs.php.net/bug.php?id=31627&edit=1

 ID:                 31627
 Comment by:         binarycleric at gmail dot com
 Reported by:        mnemo at minimum dot se
 Summary:            return statement should return
 Status:             Open
 Type:               Feature/Change Request
 Package:            Scripting Engine problem
 Operating System:   *
 PHP Version:        *
 Block user comment: N
 Private report:     N

 New Comment:

That really isn't what return does because it's not a conditional.  Similar 
behaviour can be achieved by using: 

return (mysql_connect($blah) !== false) ? true : false;


Previous Comments:
------------------------------------------------------------------------
[2005-01-20 19:28:40] mnemo at minimum dot se

Description:
------------
I wish "return doh" was treated like an expression when though this expression 
will never be computable.

The reason is that I want to write this:

mysql_connect(blah) or return false;

Just like I do with die etc.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=31627&edit=1

Reply via email to