Date: 12/15/00
- Next message: Andi Gutmans: "Re: [PHP-DEV] [PATCH] More AIX xlc trips"
- Previous message: jmoore <email protected>: "[PHP-DEV] PHP 4.0 Bug #8095 Updated: Documentation text is hard to decifer"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 8287
Updated by: hholzgra
Reported By: dbellizzi <email protected>
Old-Status: Open
Status: Closed
Bug Type: Scripting Engine problem
Assigned To:
Comments:
please have a look at the manual page at
http://php.net/empty
"empty -- Determine whether a variable is set"
empty() does only accept variables as argument.
not general expressions
Previous Comments:
---------------------------------------------------------------------------
[2000-12-15 18:39:22] dbellizzi <email protected>
The following script generates a parse error on line 8 (Parse error: parse error, expecting `')'' in /home/dbellizzi/cvs/crm/htdocs/test.php on line 8
<?php
class Foo {
function blah(){
return "abcd";
}
}
$foo = new Foo();
if (empty($foo->blah())){
echo("foo->blah is empty");
}
?>
However, when changed to this script that assigns the variable before checking it with empty(), it works fine:
<?php
class Foo {
function blah(){
return "blah";
}
}
$foo = new Foo();
$blah = $foo->blah();
if (empty($blah)){
echo("foo->blah is empty");
}
?>
I have duplicated this on a few different machines, but if you need information on my setup, libraries, etc. please email me and I'd be happy to provide more information
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8287
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andi Gutmans: "Re: [PHP-DEV] [PATCH] More AIX xlc trips"
- Previous message: jmoore <email protected>: "[PHP-DEV] PHP 4.0 Bug #8095 Updated: Documentation text is hard to decifer"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

