Bug #77412 [NEW]: PHP5 namespace PHP Fatal error, can not use ? as ? because the name is already

From: Date: Sat, 05 Jan 2019 02:19:53 +0000
Subject: Bug #77412 [NEW]: PHP5 namespace PHP Fatal error, can not use ? as ? because the name is already
Groups: php.standards 
Request: Send a blank email to standards-+get-1376@lists.php.net to get a copy of this message
From: im dot lyb at qq dot com Operating system: osx/ubuntu14.04 PHP version: 5.6.39 Package: PHP Language Specification Bug Type: Bug Bug description:PHP5 namespace PHP Fatal error, can not use ? as ? because the name is already Description: ------------ PHP Fatal error: Cannot use app\model\ServiceA as ServiceA because the name is already in use in /app/service/ServiceB.php on line 11 Under php5 In a directory, when use a class, if the directory has a same class name(not include namespace pre) and has been included before, will trigger a error. PHP7 is ok! code sample: https://github.com/liuyibao/php5-namespace-bug-report Test script: --------------- Under php5 In a directory, when use a class, if the directory has a same class name(not include namespace pre) and has been included before, will trigger a error. PHP7 is ok! code sample: https://github.com/liuyibao/php5-namespace-bug-report -- Edit bug report at https://bugs.php.net/bug.php?id=77412&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77412&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77412&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77412&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77412&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77412&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77412&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77412&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77412&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77412&r=support Expected behavior: https://bugs.php.net/fix.php?id=77412&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77412&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77412&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77412&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77412&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77412&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77412&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77412&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77412&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77412&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77412&r=mysqlcfg

« previous php.standards (#1376) next »