|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-01-23 21:51 UTC] marcel dot ouellette at wgtech dot com
-Status: Open
+Status: Closed
[2013-01-23 21:51 UTC] marcel dot ouellette at wgtech dot com
[2014-12-06 04:06 UTC] jochemstoel at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 00:00:01 2025 UTC |
Description: ------------ The "getFileName" method of ReflectionClass returns an empty string when it should return a valid path. The correct value is returned the first time it is run, however, every call afterward returns an empty string. PHP 5.4.9 NTS Apache 2.2.22 fcgid 2.3.7 [PHP Modules] bcmath bz2 calendar Core ctype curl date dom ereg exif fileinfo filter ftp gd gettext gmp hash iconv imagick imap json ldap libxml mbstring mcrypt memcache mhash mysqlnd oci8 odbc openssl pcre PDO pdo_mysql PDO_OCI PDO_ODBC pdo_pgsql pdo_sqlite Phar Reflection session shmop SimpleXML soap sockets SPL sqlsrv standard tidy tokenizer wddx wincache xdebug xhprof xml xmlreader xmlrpc xmlwriter xsl zip zlib [Zend Modules] Xdebug Test script: --------------- <?php //Run this twice with wincache loaded //Run twice without wincache loaded class Foo{ public function dump(){ $r = new ReflectionClass($this); $path = $r->getFileName(); var_dump($path); } } $test = new Foo(); $test->dump(); Expected result: ---------------- A var_dump of a string containing the path to the current file.