Edit report at http://bugs.php.net/bug.php?id=52051&edit=1

 ID:               52051
 Updated by:       fel...@php.net
 Reported by:      php at kingsquare dot nl
 Summary:          handling of case sensitivity of old-style constructors
                   changed in 5.3+
-Status:           Assigned
+Status:           Closed
 Type:             Bug
 Package:          Scripting Engine problem
 Operating System: Win32
 PHP Version:      5.3.2
 Assigned To:      felipe

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2010-06-12 17:30:23] fel...@php.net

Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=300407
Log: - Fixed bug #52051 (handling of case sensitivity of old-style
constructors changed in 5.3+)

------------------------------------------------------------------------
[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

Reply via email to