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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 10 02:01:35 2025 UTC