| Total Complexity | 14 |
| Total Lines | 94 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class Zval |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @param $var |
||
| 14 | * @return bool |
||
| 15 | */ |
||
| 16 | public static function isRef($var): bool |
||
| 17 | { |
||
| 18 | $info = self::getZvalRefCountInfo($var); |
||
| 19 | return (boolean)$info['is_ref']; |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param $var |
||
| 24 | * @return mixed |
||
| 25 | */ |
||
| 26 | public static function getRefCount($var) |
||
| 27 | { |
||
| 28 | $info = self::getZvalRefCountInfo($var); |
||
| 29 | return $info['refcount']; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param $var |
||
| 34 | * @return bool |
||
| 35 | */ |
||
| 36 | public static function canCopyOnWrite($var): bool |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param $var |
||
| 44 | * @return bool |
||
| 45 | */ |
||
| 46 | public static function canReferenceWithoutCopy($var): bool |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param $var |
||
| 54 | * @return array |
||
| 55 | */ |
||
| 56 | public static function getZvalRefCountInfo($var): array |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @param $a |
||
| 67 | * @param $b |
||
| 68 | * @return bool |
||
| 69 | */ |
||
| 70 | public static function isRefto(&$a, &$b): bool |
||
| 81 | } |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @param $a |
||
| 85 | * @param $b |
||
| 86 | * @return bool |
||
| 87 | */ |
||
| 88 | public static function isReferenceOf(&$a, &$b): bool |
||
| 104 | } |
||
| 105 | } |
||
| 106 |