3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace ns1; class c1{} namespace ns1\c1; class c11{} namespace main; use ns1\c1; $c1 = new c1(); $c11 = new c1\c11(); function takes_c1(c1 $bar) { var_dump(); } function takes_c11(c1\c11 $bar) { var_dump(); } var_dump(get_class($c1)); // object(ns1\c1)#1 (0) { } var_dump(get_class($c11)); // object(ns1\c1\c11)#2 (0) { } takes_c1($c1); takes_c11($c11);
Output for git.master, git.master_jit, rfc.property-hooks
string(6) "ns1\c1" string(10) "ns1\c1\c11" Fatal error: Uncaught ArgumentCountError: var_dump() expects at least 1 argument, 0 given in /in/0kV1o:18 Stack trace: #0 /in/0kV1o(18): var_dump() #1 /in/0kV1o(28): main\takes_c1(Object(ns1\c1)) #2 {main} thrown in /in/0kV1o on line 18
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

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


preferences:
44.48 ms | 401 KiB | 8 Q