3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function handler1() { echo "\n######### " . __FUNCTION__ . "() called #########\n"; } function handler2() { echo "\n######### " . __FUNCTION__ . "() called #########\n"; print_r(error_get_last()); new bar(); } register_shutdown_function('handler1'); register_shutdown_function('handler2'); new foo();

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

Output for Array change keys
Fatal error: Uncaught Error: Class 'foo' not found in /in/vn5TE:15 Stack trace: #0 {main} thrown in /in/vn5TE on line 15 ######### handler1() called ######### ######### handler2() called ######### Array ( [type] => 1 [message] => Uncaught Error: Class 'foo' not found in /in/vn5TE:15 Stack trace: #0 {main} thrown [file] => /in/vn5TE [line] => 15 ) Fatal error: Uncaught Error: Class 'bar' not found in /in/vn5TE:10 Stack trace: #0 [internal function]: handler2() #1 {main} thrown in /in/vn5TE on line 10
Output for Lexical anon
Fatal error: Class 'foo' not found in /in/vn5TE on line 15 ######### handler1() called ######### ######### handler2() called ######### Array ( [type] => 1 [message] => Class 'foo' not found [file] => /in/vn5TE [line] => 15 ) Fatal error: Class 'bar' not found in /in/vn5TE on line 10
Output for Typed properties
Fatal error: Uncaught Error: Class 'foo' not found in /in/vn5TE:15 Stack trace: #0 {main} thrown in /in/vn5TE on line 15 ######### handler1() called ######### ######### handler2() called ######### Array ( [type] => 1 [message] => Uncaught Error: Class 'foo' not found in /in/vn5TE:15 Stack trace: #0 {main} thrown [file] => /in/vn5TE [line] => 15 ) Fatal error: Uncaught Error: Class 'bar' not found in /in/vn5TE:10 Stack trace: #0 [internal function]: handler2() #1 {main} thrown in /in/vn5TE on line 10

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