3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooBar extends ArrayObject { public function baz(){ return 'baz'; } } $fb = new Foobar; $fb[] = 'wert 1'; $fb[] = 'wert 2'; $fb['mykey'] = 'myvalue'; $fb[0] = 'ueberschreibt wert 1'; // Testausgabe: var_dump($fb); echo $fb[1] . PHP_EOL; echo $fb['mykey'] . PHP_EOL; echo $fb->baz();
Output for git.master, git.master_jit, rfc.property-hooks
object(FooBar)#1 (1) { ["storage":"ArrayObject":private]=> array(3) { [0]=> string(20) "ueberschreibt wert 1" [1]=> string(6) "wert 2" ["mykey"]=> string(7) "myvalue" } } wert 2 myvalue baz

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:
79.07 ms | 401 KiB | 8 Q