summaryrefslogtreecommitdiff
path: root/Zend/tests/bug77877.phpt
blob: d4627f77c87d584797b1040458c2bc600ed6aff7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Bug #77877 call_user_func() passes $this to static methods
--FILE--
<?php
class Foo {
	static public function bar() {
		var_dump($this);
	}
}
try {
	array_map([new Foo, 'bar'],[1]);
} catch (Throwable $e) {
	echo $e->getMessage() . "\n";
}
try {
	call_user_func([new Foo, 'bar']);
} catch (Throwable $e) {
	echo $e->getMessage() . "\n";
}
?>
--EXPECT--
Using $this when not in object context
Using $this when not in object context