3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($var) { echo "Test $var"; } class foo { var $arr = array("test"); /*function test($var) { echo "Test $var"; }*/ } class moo { static public function test2(){ echo "test2"; } } $a = new foo(); var_dump($a); $a->arr[0]("testvalue"); /***************************/ $x[0] = "test2"; moo::$x[0]();

preferences:
55.62 ms | 402 KiB | 5 Q