3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function x() { return 'x'; } } $a = new A(); var_dump( call_user_func([$a, 'x']), call_user_func([$a, 'y']) );

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
Warning: call_user_func() expects parameter 1 to be a valid callback, class 'A' does not have a method 'y' in /in/guDVU on line 13 string(1) "x" NULL
Output for Arrow functions
Warning: call_user_func() expects parameter 1 to be a valid callback, class 'A' does not have a method 'y' in /in/guDVU on line 13 string(1) "x" NULL

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page