3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test{ function showMess() { echo 'this is a test'; } } $t = test; // no memory allocated for class var_dump($t); // string test $t = new test; // don't need () for class w/o parameter for instatiation var_dump($t,$t->showMess); // need () to invoke method var_dump($t->showMess()); // can't var_dump a method; null var_dump('have a nice day'); // string
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Undefined constant "test" in /in/iFBj2:8 Stack trace: #0 {main} thrown in /in/iFBj2 on line 8
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:
40.24 ms | 401 KiB | 8 Q