3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Converter { public function runAllConversions(&$value) { $value = str_replace('x', 'MODIFIED', $value); } } $data = [ 'a' => 'x', 'b' => 'x', 'c' => ['x', 'a' => 'x', ['a' => 'x', 'x']], 'd' => ['x', 'b' => 'x', ['a' => 'x', 'x', ['x', 'c' => 'x', ['a' => 'x', 'x']]]] ]; array_walk_recursive($data, [new Converter(), 'runAllConversions']); print_r($data);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [a] => MODIFIED [b] => MODIFIED [c] => Array ( [0] => MODIFIED [a] => MODIFIED [1] => Array ( [a] => MODIFIED [0] => MODIFIED ) ) [d] => Array ( [0] => MODIFIED [b] => MODIFIED [1] => Array ( [a] => MODIFIED [0] => MODIFIED [1] => Array ( [0] => MODIFIED [c] => MODIFIED [1] => Array ( [a] => MODIFIED [0] => MODIFIED ) ) ) ) )

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:
59.91 ms | 2257 KiB | 4 Q