3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ptr2str($ptr) { $out = ""; for ($i = 0; $i < 8; $i++) { $out .= chr($ptr & 0xff); $ptr >>= 8; } return $out; } class obj { function __tostring() { global $arr; $arr = 1; for ($i = 0; $i < 5; $i++) { $v[$i] = 'hi'.$i; } return 'hi'; } } $arr = array('string' => new obj); array_walk_recursive($arr, 'settype');
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: Iterated value is no longer an array or object in /in/WY0pB:27 Stack trace: #0 /in/WY0pB(27): array_walk_recursive(1, 'settype') #1 {main} thrown in /in/WY0pB on line 27
Process exited with code 255.

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