3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a= & $_POST; $a=array(); function countRefs(&$var) { ob_start(); debug_zval_dump(&$var); preg_match('~refcount\((\d+)\)~', ob_get_clean(), $matches); return $matches[1] - 4; } var_dump(countRefs($a));
Output for 5.4.0 - 5.4.24
Fatal error: Call-time pass-by-reference has been removed in /in/LAfY9 on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Deprecated: Call-time pass-by-reference has been deprecated in /in/LAfY9 on line 8 int(1)

preferences:
183.3 ms | 1395 KiB | 62 Q