Bug #18274 Updated: cannot use if( empty( $object->method() ) )

From: Date: Thu, 11 Jul 2002 10:31:56 +0000
Subject: Bug #18274 Updated: cannot use if( empty( $object->method() ) )
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13842@lists.php.net to get a copy of this message
ID: 18274 Updated by: sander@php.net Reported By: dennis@moellegaard.dk -Status: Open +Status: No Feedback Bug Type: Scripting Engine problem Operating System: Debian PHP Version: 4.1.2 New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2002-07-11 06:25:00] dennis@moellegaard.dk 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18274&edit=1

« previous php.bugs (#13842) next »