Req #67191 [Opn->Csd]: using namespace classname and same classname compile warning in extension
| From: | nikic@php.net | Date: | Thu, 18 Feb 2021 11:27:23 +0000 |
| Subject: | Req #67191 [Opn->Csd]: using namespace classname and same classname compile warning in extension | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232241@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67191&edit=1
ID: 67191
Updated by: nikic@php.net
Reported by: netyum at 163 dot com
Summary: using namespace classname and same classname compile
warning in extension
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: Compile Warning
Operating System: linux
PHP Version: 5.5.12
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
I think this was already fixed earlier, but if nothing else the removal of PHP 4 constructor support
in PHP 8 will have fixed this.
Previous Comments:
------------------------------------------------------------------------
[2014-05-03 15:36:26] netyum at 163 dot com
Description:
------------
<?php
namespace Utils\Greeting;
class Greeting {
public static function Greeting() {
echo "In Greeting Method\n";
}
}
Greeting::Greeting();
?>
ok, this is no problemã
but my write down an extension(c code). feature to same up .
using namespace Utils\Greeting
run php
show error:
PHP Warning: Constructor utils\Greeting::Greeting() cannot be static in Unknown on line 0
Since php script, why not expandã
please see https://github.com/php/php-src/blob/master/Zend/zend_API.c
in 2057 line.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67191&edit=1