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

From: Date: Sat, 05 Jan 2019 09:25:38 +0000
Subject: Bug #77412 [Opn->Wfx]: PHP5 namespace PHP Fatal error, can not use ? as ? because the name is already
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218796@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77412&edit=1 ID: 77412 Updated by: nikic@php.net Reported by: im dot lyb at qq dot com Summary: PHP5 namespace PHP Fatal error, can not use ? as ? because the name is already -Status: Open +Status: Wont fix Type: Bug -Package: PHP Language Specification +Package: Scripting Engine problem Operating System: osx/ubuntu14.04 PHP Version: 5.6.39 Block user comment: N Private report: N New Comment: Name conflict rules have been relaxed at some point during PHP 7 to allow such usages. This will not be changed on PHP 5 though, because PHP 5 is no longer supported. Previous Comments: ------------------------------------------------------------------------ [2019-01-05 02:19:53] im dot lyb at qq dot com 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 this bug report at https://bugs.php.net/bug.php?id=77412&edit=1

« previous php.bugs (#218796) next »