3v4l.org

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

preferences:
184.54 ms | 1395 KiB | 65 Q