summaryrefslogtreecommitdiff
path: root/ext/standard/tests/class_object/bug71442.phpt
blob: d6b3d6699b34efcfc77cb8ff91bb033449c5d454 (plain)
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
--TEST--
Bug #71442 (forward_static_call crash)
--FILE--
<?php

class A
{
	const NAME = 'A';
	public static function test() {
		$args = func_get_args();
		echo static::NAME, " ".join(',', $args)." \n";
	}
}

class B extends A
{
	const NAME = 'B';

	public static function test() {
		echo self::NAME, "\n";
		forward_static_call(array('A', 'test'), 'more', 'args');
		forward_static_call( 'test', 'other', 'args');
	}
}

B::test('foo');

function test() {
	$args = func_get_args();
	echo "C ".join(',', $args)." \n";
}

?>
--EXPECT--
B
B more,args 
C other,args