|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-07-11 06:31 UTC] sander@php.net
[2002-07-11 06:32 UTC] sander@php.net
[2002-07-11 06:48 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 02:00:01 2026 UTC |
The following source returns "Parse error: parse error, unexpected '(', expecting ',' or ')' in [...]/bug.php on line 24". <?php class MyClass { function myFunction($arg) { return $arg; } } $c = new MyClass; // works $v = $c->myFunction('foo'); if( empty( $v ) ) print "test-1: empty"; else print "test-1: not empty"; // don't work if( empty( $c->myFunction('foo') ) ) // this is the problem print "test-2: empty"; else print "test-2: not empty"; ?> empty() can be replaced with same result with isset(). The