Advertisement
Guest User

Untitled

a guest
Jul 6th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function isRef(&$a, &$b) {
  2.     static $c;
  3.     if (!$c) $c = new stdClass();
  4.    
  5.     $aa = $a;
  6.     $a = $c;
  7.    
  8.     if ($a === $b) {
  9.         $a = $aa;
  10.         return true;
  11.     } else {
  12.         $a = $aa;
  13.         return false;
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement