Bug #52051 [Opn->Asn]: handling of case sensitivity of old-style constructors changed in 5.3+
| From: | felipe@php.net | Date: | Sat, 12 Jun 2010 15:24:11 +0000 |
| Subject: | Bug #52051 [Opn->Asn]: handling of case sensitivity of old-style constructors changed in 5.3+ | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151376@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52051&edit=1
ID: 52051
Updated by: felipe@php.net
Reported by: php at kingsquare dot nl
Summary: handling of case sensitivity of old-style constructors
changed in 5.3+
-Status: Open
+Status: Assigned
Type: Bug
Package: Scripting Engine problem
Operating System: Win32
PHP Version: 5.3.2
-Assigned To:
+Assigned To: felipe
Previous Comments:
------------------------------------------------------------------------
[2010-06-11 17:33:10] php at kingsquare dot nl
Description:
------------
Since PHP 5.3+ (it worked in 5.2.6) handling of old-style constructors
with case sensitive (i.e. camelcasing) changed. The 'generated'
constructor is only available in lower case since 5.3
Test script:
---------------
<?php
// WORKING
class AA {
function AA() { echo 'works!'; }
}
class bb extends AA {}
class CC extends bb {
function CC() { parent::bb(); }
}
new CC();
// FATAL ERROR
class A {
function A() { echo 'check'; }
}
class B extends A {}
class C extends B {
function C() { parent::B(); }
}
new C();
Expected result:
----------------
works!check
Actual result:
--------------
works!
Fatal error: Call to undefined method B::B() in C:\php\test.php on line
18
Call Stack:
0.0002 331488 1. {main}() C:\php\test.php:0
0.0003 331656 2. C->C() C:\php\test.php:20
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52051&edit=1