1--TEST--
2Bug #40398 (parent and self callback functions erroneously called statically)
3--FILE--
4<?php
5
6class Base
7{
8	function __construct($msg)
9	{
10		echo __METHOD__ . "($msg)\n";
11	}
12}
13
14class Derived_1 extends Base
15{
16	public function __construct()
17	{
18		$args = func_get_args();
19		call_user_func_array(array($this, 'Base::__construct'), $args);
20	}
21}
22
23class Derived_2 extends Base
24{
25	public function __construct()
26	{
27		$args = func_get_args();
28		call_user_func_array(array($this, 'parent::__construct'), $args);
29	}
30}
31
32class Derived_3 extends Base
33{
34	public function __construct()
35	{
36		$args = func_get_args();
37		call_user_func_array('Base::__construct', $args);
38	}
39}
40
41class Derived_4 extends Base
42{
43	public function __construct()
44	{
45		$args = func_get_args();
46		call_user_func_array('parent::__construct', $args);
47	}
48}
49
50class Derived_5 extends Base
51{
52	public function __construct()
53	{
54		$args = func_get_args();
55		call_user_func_array(array('Base', '__construct'), $args);
56	}
57}
58
59class Derived_6 extends Base
60{
61	public function __construct()
62	{
63		$args = func_get_args();
64		call_user_func_array(array('parent', '__construct'), $args);
65	}
66}
67
68new Derived_1('1');
69new Derived_2('2');
70new Derived_3('3');
71new Derived_4('4');
72new Derived_5('5');
73new Derived_6('6');
74
75?>
76===DONE===
77--EXPECTF--
78Base::__construct(1)
79Base::__construct(2)
80Base::__construct(3)
81Base::__construct(4)
82Base::__construct(5)
83Base::__construct(6)
84===DONE===
85