Skip to content
This repository
tree: 74f4b772aa
Fetching contributors…

Cannot retrieve contributors at this time

file 39 lines (32 sloc) 0.665 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
--TEST--
add old-style parent ctor by adoptting
--SKIPIF--
<?php if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip"; ?>
--FILE--
<?php

class Father {
function teSt() {
var_dump('new constructor');
}
}

class Test {
}

class FOO_test extends test {
}

class FOO_test_Child extends FOO_test {
}

runkit_class_adopt("Test", "Father");
$a = new test;
$a = new foo_test;
$a = new FOO_test_Child;

runkit_class_emancipate("Test");
echo "after emancipation\n";
$a = new test;
$a = new foo_test;
$a = new FOO_test_Child;

?>
--EXPECT--
string(15) "new constructor"
string(15) "new constructor"
string(15) "new constructor"
after emancipation
Something went wrong with that request. Please try again.