php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21693 Combination of empty and realpath produces an error
Submitted: 2003-01-16 13:24 UTC Modified: 2003-01-16 13:25 UTC
From: MDEnigma at gmx dot de Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.2.3 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: MDEnigma at gmx dot de
New email:
PHP Version: OS:

 

 [2003-01-16 13:24 UTC] MDEnigma at gmx dot de
if( empty(realpath(__FILE__)) ) echo "test";
will produce a parse error like:
Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in d:\wwwroot\test3.php on line x

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-16 13:25 UTC] derick@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

read the docs about @ http://php.net/empty :

"Note that this is meaningless when used on anything which isn't a variable; i.e. empty (addslashes ($name)) has no meaning since it would be checking whether something which isn't a variable is a variable with a FALSE value."
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 10:01:29 2024 UTC