PHPDaemon\Core\Debug::refcount PHP Method

refcount() public static method

Get refcount of the given variable
public static refcount ( &$var ) : integer
return integer
    public static function refcount(&$var)
    {
        ob_start();
        debug_zval_dump([&$var]);
        $c = preg_replace("/^.+?refcount\\((\\d+)\\).+\$/ms", '$1', substr(ob_get_contents(), 24), 1) - 4;
        ob_end_clean();
        return $c;
    }