php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47885 expr in empty() causes parse error
Submitted: 2009-04-03 10:01 UTC Modified: 2009-04-03 10:52 UTC
From: ninzya at inbox dot lv Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.3.0RC1 OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ninzya at inbox dot lv
New email:
PHP Version: OS:

 

 [2009-04-03 10:01 UTC] ninzya at inbox dot lv
Description:
------------
expr in empty() causes parse error

Reproduce code:
---------------
<?php

if( empty( $x =5)) {
}

?>

Expected result:
----------------
No parse errors

Actual result:
--------------
Parse error

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-03 10:52 UTC] felipe@php.net
Says the documentation:
"Note: empty() only checks variables as anything else will result in a parse error. In other words, the following will not work: empty(trim($name))." -- http://docs.php.net/empty
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Aug 07 05:00:03 2025 UTC