Conditions | 5 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
88 | public static function isReferenceOf(&$a, &$b): bool |
||
89 | { |
||
90 | if (!self::isRef('a') || self::getZvalRefCountInfo('a') !== self::getZvalRefCountInfo('b')) { |
||
91 | return false; |
||
92 | } |
||
93 | $tmp = $a; |
||
94 | if (is_object($a) || is_array($a)) { |
||
95 | $a = 'test'; |
||
96 | $ret = $b === 'test'; |
||
97 | $a = $tmp; |
||
98 | } else { |
||
99 | $a = []; |
||
100 | $ret = $b === []; |
||
101 | $a = $tmp; |
||
102 | } |
||
103 | return $ret; |
||
104 | } |
||
106 |