3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a= & $_POST; $a=array(); function isRef($var) { $info = getZvalRefCountInfo($var); return (boolean) $info['is_ref']; } function getZvalRefCountInfo($var) { ob_start(); xdebug_debug_zval($var); $info = ob_get_clean(); preg_match('(: \(refcount=(\d+), is_ref=(\d+)\))', $info, $match); return array('refcount' => $match[1], 'is_ref' => $match[2]); } var_dump(isRef($a));
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function xdebug_debug_zval() in /in/1Em4S:13 Stack trace: #0 /in/1Em4S(7): getZvalRefCountInfo(Array) #1 /in/1Em4S(19): isRef(Array) #2 {main} thrown in /in/1Em4S on line 13
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:
32.16 ms | 401 KiB | 8 Q