php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46914 empty(CONSTANT) throws an T_PAAMAYIM_NEKUDOTAYIM error
Submitted: 2008-12-20 17:45 UTC Modified: 2008-12-20 22:15 UTC
From: christian at deligant dot net Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.2.8 OS: debian etch
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: christian at deligant dot net
New email:
PHP Version: OS:

 

 [2008-12-20 17:45 UTC] christian at deligant dot net
Description:
------------
see code below

Reproduce code:
---------------
<?php
define ('EXAMPLE', 0);

if(empty(EXAMPLE)) {
    // some code here
}

/*

Save this file in example.php
Opening it via web or CLI the parser stops with an error saying:

Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in example.php on line 4

*/
?>

Expected result:
----------------
the code in the IF cycle to be executed if EXAMPLE is defined as any value that resolves to "empty"

Actual result:
--------------
Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in example.php on line 4

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-20 22:15 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 18:01:33 2025 UTC