Bug #12630 Updated: BUG: cannot return
| From: | alindeman@php.net | Date: | Tue, 07 Aug 2001 18:05:00 +0000 |
| Subject: | Bug #12630 Updated: BUG: cannot return | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-62467@lists.php.net to get a copy of this message | ||
ID: 12630
Updated by: alindeman
Reported By: joustin@plusnet.pl
Old Summary: BUG: cannot "return'' with the "function() or
dosomething'' construct
Old Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Red Hat Linux, Win2000 sp2
PHP Version: 4.0.6
New Comment:
this is not implemented in php
if you want to try something like that try...
if (!test())return;
Previous Comments:
------------------------------------------------------------------------
[2001-08-07 13:59:07] joustin@plusnet.pl
Tested on Red Hat
------------------------------------------------------------------------
[2001-08-07 13:54:44] joustin@plusnet.pl
Hello!
This seems quite odd...
In the ...
function() or dosomething;
...construct it seems that PHP only allows the usage of standard operators and functions in the
place of "dosomething", so the 'return' doesn't work at all since it's
a operator-like thingy.
The following snippet will produce a parse error:
----------------------
function test(){
return false;
};
function test2(){
test() or return;
}
----------------------
Thanks in advance for a quick fix :)
Keep up the good work!
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12630&edit=1