3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class strings { function fix_string($a) { var_dump(xdebug_get_function_stack()); } function fix_strings($b) { foreach ($b as $item) { $this->fix_string($item); } } } $s = new strings(); $ret = $s->fix_strings(array('Derick')); ?>

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

Output for Typed properties v2
Fatal error: Uncaught Error: Call to undefined function xdebug_get_function_stack() in /in/1A6ug:5 Stack trace: #0 /in/1A6ug(10): strings->fix_string('Derick') #1 /in/1A6ug(16): strings->fix_strings(Array) #2 {main} thrown in /in/1A6ug on line 5
Output for Array change keys
Fatal error: Uncaught Error: Call to undefined function xdebug_get_function_stack() in /in/1A6ug:5 Stack trace: #0 /in/1A6ug(10): strings->fix_string('Derick') #1 /in/1A6ug(16): strings->fix_strings(Array) #2 {main} thrown in /in/1A6ug on line 5
Output for Lexical anon
Fatal error: Call to undefined function xdebug_get_function_stack() in /in/1A6ug on line 5

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