3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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)