Patch bug64235.phpt for Scripting Engine problem Bug #64235
Patch version 2013-02-20 07:41 UTC
Return to Bug #64235 |
Download this patch
Patch Revisions:
Developer: laruence@php.net
--TEST--
Bug #64235 (Insteadof not work for class method in 5.4.11)
--FILE--
<?php
class TestParentClass
{
public function method()
{
print_r('Parent method');
print "\n";
}
}
trait TestTrait
{
public function method()
{
print_r('Trait method');
print "\n";
}
}
class TestChildClass extends TestParentClass
{
use TestTrait
{
TestTrait::method as methodAlias;
TestParentClass::method insteadof TestTrait;
}
}
(new TestChildClass)->method();
(new TestChildClass)->methodAlias();
?>
--EXPECT--
Parent method
Trait method
|