3v4l.org

run code in 200+ PHP versions simultaneously
<?php class Monkey{} $gibbon = new Monkey; $gibbon->name = 'Librarian'; function splort() { global $gibbon; if($gibbon->name == 'Librarian') echo "Ook."; else echo 'Boing!'; } register_shutdown_function('splort'); echo "Time for go to bed.";

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

Output for branch php-master+opcache
Time for go to bed.Ook.
Output for branch php-master
Time for go to bed.Ook.
Output for Typed properties v2
Time for go to bed.Ook.
Output for Arrow functions
Time for go to bed.Ook.
Output for Object typehint
Time for go to bed.Ook.
Output for Array change keys
Time for go to bed.Ook.
Output for Lexical anon
Time for go to bed.Ook.

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