File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
Zend /
tests /
bug50261.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
1: --TEST--
2: Bug #50261 (Crash When Calling Parent Constructor with call_user_func())
3: --FILE--
4: <?php
5:
6: class testClass {
7: function testClass($x) {
8: echo __METHOD__, " (". $x . ")\n";
9: }
10: }
11:
12: class testClass2 extends testClass {
13: function __construct() {
14: static $x = 0;
15:
16: if ($x) {
17: print "Infinite loop...\n";
18: } else {
19: $x++;
20:
21: parent::__construct(1);
22: testclass::__construct(2);
23: call_user_func(array('parent', '__construct'), 3);
24: call_user_func(array('testclass', '__construct'), 4);
25: call_user_func(array('testclass', 'testclass'), 5);
26: }
27: }
28: }
29:
30: new testClass2;
31:
32: ?>
33: --EXPECT--
34: testClass::testClass (1)
35: testClass::testClass (2)
36: testClass::testClass (3)
37: testClass::testClass (4)
38: testClass::testClass (5)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>