php-src/Zend/tests/bug48215_2.phpt
Scott MacVicar d976be4bda Make the check case sensitive, and since we can only have a constructor that matches the class name or is __construct
its probably safe to just check for __. This means we can skip lowering the function_name, which is hard to be binary
safe sine we don't store the length.

If we just did a zend_hash_exists lookup we'd be fine since its stored lowercased already :)
2009-06-19 03:29:47 +00:00

23 lines
476 B
PHP

--TEST--
Bug #48215 - parent::method() calls __construct, case sensitive test
--FILE--
<?php
class a {
public function __CONSTRUCT() { echo __METHOD__ . "\n"; }
public function a() { echo __METHOD__ . "\n"; }
}
class b extends a {}
class c extends b {
function C() {
b::b();
}
}
$c = new c();
?>
===DONE===
--EXPECTF--
Strict Standards: Redefining already defined constructor for class a in %s on line %d
Fatal error: Call to undefined method b::b() in %s on line %d