|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-04-17 00:35 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2015-04-17 00:35 UTC] cmb@php.net
[2015-04-17 08:41 UTC] wako057 at gmail dot com
-Status: Feedback
+Status: Assigned
[2015-04-17 08:41 UTC] wako057 at gmail dot com
[2015-04-17 11:21 UTC] cmb@php.net
-Status: Assigned
+Status: Verified
-Type: Bug
+Type: Documentation Problem
-Package: Documentation problem
+Package: Scripting Engine problem
-Assigned To: cmb
+Assigned To:
[2015-04-17 11:21 UTC] cmb@php.net
[2015-08-18 13:38 UTC] cmb@php.net
-Summary: Missing Information in translation
+Summary: old-style constructor and __construct()
-Assigned To:
+Assigned To: cmb
[2015-08-18 13:41 UTC] cmb@php.net
[2015-08-18 13:41 UTC] cmb@php.net
-Status: Verified
+Status: Closed
[2015-08-18 13:41 UTC] cmb@php.net
[2015-09-03 21:21 UTC] miksir at maker dot ru
[2015-09-03 22:15 UTC] cmb@php.net
[2015-09-03 22:17 UTC] cmb@php.net
-Status: Closed
+Status: Not a bug
[2015-09-03 22:17 UTC] cmb@php.net
[2015-09-04 11:59 UTC] miksir at maker dot ru
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 16 07:00:01 2025 UTC |
Description: ------------ I've tested this issue on php 5.3.28 and php 5.5.10 When the parser found in class a method called as the class, insensitive to the case, it generate a Strict Standard error. But if it found the __construct first, at this moment no error is raised. With namespace the case doesn't happened at all. Test script: --------------- <?php class Foo { public function foo() { echo 'ahaha'; } function __construct() { echo 'hihi'; } } Generate a: PHP Strict Standards: Redefining already defined constructor for class Foo BUT <?php class Foo { function __construct() { echo 'hihi'; } public function foo() { echo 'ahaha'; } } Don't <?php namespace Bar; class Foo { public function foo() { echo 'ahaha'; } function __construct() { echo 'hihi'; } } new Foo(); Neither Expected result: ---------------- When a __construct is present, no error should be raised Actual result: -------------- Strict Standards: Redefining already defined constructor for class Foo in /var/www/tt.php on line 7