3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Comparator { public static function compareEntities($entityX, $entityY, array $exclusion = []) { if (is_object($entityX) && is_object($entityY)) { return self::checkObjectsEquals($entityX, $entityY, $exclusion); } if (is_array($entityX) && is_array($entityY)) { return self::checkArraysEquals($entityX, $entityY, $exclusion); } return $entityX == $entityY; } public static function checkObjectsEquals($objectX, $objectY, array $exclusion = []) { if (!is_object($objectX) || !is_object($objectY)) { return false; } return self::checkObjectsEqualsByReflection($objectX, $objectY, $exclusion); } public static function checkArraysEquals(array $arrayX, array $arrayY, array $exclusion = []) { return self::checkArraysEqualsByReflection($arrayX, $arrayY, $exclusion); } private static function checkObjectsEqualsByReflection($objectX, $objectY, array $exclusion = [], array &$visitedObjectHashes = []) { if (get_class($objectX) != get_class($objectY)) { return false; } $visitedObjectHashes[] = self::getObjectHash($objectX); $visitedObjectHashes[] = self::getObjectHash($objectY); $reflectionX = new \ReflectionObject($objectX); $reflectionY = new \ReflectionObject($objectY); if (count($reflectionX->getProperties()) != count($reflectionY->getProperties())) { return false; } foreach ($reflectionX->getProperties() as $property) { $property->setAccessible(true); if (!$reflectionY->hasProperty($property->getName())) { return false; } if (!in_array($property->getName(), $exclusion)) { $entityX = $property->getValue($objectX); $entityY = $property->getValue($objectY); if (!($type = self::getPairType($entityX, $entityY))) { return false; } switch ($type) { case 'object' : $alreadyVisited = array_intersect([self::getObjectHash($entityX), self::getObjectHash($entityY)], $visitedObjectHashes); if (!$alreadyVisited && !self::checkObjectsEqualsByReflection($entityX, $entityY, $exclusion, $visitedObjectHashes)) { return false; } break; case 'array' : if (!self::checkArraysEqualsByReflection($entityX, $entityY, $exclusion, $visitedObjectHashes)) { return false; } break; default : if ($entityX != $entityY) { return false; } break; } } } return true; } private static function checkArraysEqualsByReflection(array $arrayX, array $arrayY, array $exclusion = [], array &$visitedObjectHashes = []) { if (count($arrayX) != count($arrayY)) { return false; } $entityY = current($arrayY); foreach ($arrayX as $entityX) { if (!($type = self::getPairType($entityX, $entityY))) { return false; } switch ($type) { case 'object' : $alreadyVisited = array_intersect([self::getObjectHash($entityX), self::getObjectHash($entityY)], $visitedObjectHashes); if (!$alreadyVisited && !self::checkObjectsEqualsByReflection($entityX, $entityY, $exclusion, $visitedObjectHashes)) { return false; } break; case 'array' : if (!self::checkArraysEqualsByReflection($entityX, $entityY, $exclusion, $visitedObjectHashes)) { return false; } break; default : if ($entityX != $entityY) { return false; } break; } $entityY = next($arrayY); } return true; } private static function getObjectHash($object) { return spl_object_hash($object); } private static function getPairType($entityX, $entityY) { if (gettype($entityX) != gettype($entityY)) { return null; } return gettype($entityX); } } class Foo { private $holder; private $children; public function __construct($content = '', array $children = []) { $this->holder = $content; $this->setChildren($children); } public function setChildren(array $children) { $this->children = $children; foreach ($children as $child) { $child->setParent($this); } } } class Bar { private $holder; private $parent; public function __construct($content = '', Foo $parent = null) { $this->holder = $content; $this->setParent($parent); } public function setParent(Foo $parent = null) { $this->parent = $parent; } } $child0 = new Bar('child#0'); $child1 = new Bar('child#1'); //same $child2 = new Bar('child#0'); $child3 = new Bar('child#1'); $parent0 = new Foo('parent', [$child0, $child1]); $parent1 = new Foo('parent', [$child2, $child3]); //Valid: var_dump(Comparator::compareEntities($parent0, $parent1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UNsj6
function name:  (null)
number of ops:  38
compiled vars:  !0 = $child0, !1 = $child1, !2 = $child2, !3 = $child3, !4 = $parent0, !5 = $parent1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  167     0  E >   NEW                                              $6      'Bar'
          1        SEND_VAL_EX                                              'child%230'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $6
  168     4        NEW                                              $9      'Bar'
          5        SEND_VAL_EX                                              'child%231'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $9
  170     8        NEW                                              $12     'Bar'
          9        SEND_VAL_EX                                              'child%230'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $12
  171    12        NEW                                              $15     'Bar'
         13        SEND_VAL_EX                                              'child%231'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !3, $15
  173    16        NEW                                              $18     'Foo'
         17        SEND_VAL_EX                                              'parent'
         18        INIT_ARRAY                                       ~19     !0
         19        ADD_ARRAY_ELEMENT                                ~19     !1
         20        SEND_VAL_EX                                              ~19
         21        DO_FCALL                                      0          
         22        ASSIGN                                                   !4, $18
  174    23        NEW                                              $22     'Foo'
         24        SEND_VAL_EX                                              'parent'
         25        INIT_ARRAY                                       ~23     !2
         26        ADD_ARRAY_ELEMENT                                ~23     !3
         27        SEND_VAL_EX                                              ~23
         28        DO_FCALL                                      0          
         29        ASSIGN                                                   !5, $22
  177    30        INIT_FCALL                                               'var_dump'
         31        INIT_STATIC_METHOD_CALL                                  'Comparator', 'compareEntities'
         32        SEND_VAR                                                 !4
         33        SEND_VAR                                                 !5
         34        DO_FCALL                                      0  $26     
         35        SEND_VAR                                                 $26
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Class Comparator:
Function compareentities:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 7
filename:       /in/UNsj6
function name:  compareEntities
number of ops:  28
compiled vars:  !0 = $entityX, !1 = $entityY, !2 = $exclusion
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <array>
    7     3        TYPE_CHECK                                  256  ~3      !0
          4      > JMPZ_EX                                          ~3      ~3, ->7
          5    >   TYPE_CHECK                                  256  ~4      !1
          6        BOOL                                             ~3      ~4
          7    > > JMPZ                                                     ~3, ->14
    8     8    >   INIT_STATIC_METHOD_CALL                                  'checkObjectsEquals'
          9        SEND_VAR_EX                                              !0
         10        SEND_VAR_EX                                              !1
         11        SEND_VAR_EX                                              !2
         12        DO_FCALL                                      0  $5      
         13      > RETURN                                                   $5
   11    14    >   TYPE_CHECK                                  128  ~6      !0
         15      > JMPZ_EX                                          ~6      ~6, ->18
         16    >   TYPE_CHECK                                  128  ~7      !1
         17        BOOL                                             ~6      ~7
         18    > > JMPZ                                                     ~6, ->25
   12    19    >   INIT_STATIC_METHOD_CALL                                  'checkArraysEquals'
         20        SEND_VAR_EX                                              !0
         21        SEND_VAR_EX                                              !1
         22        SEND_VAR_EX                                              !2
         23        DO_FCALL                                      0  $8      
         24      > RETURN                                                   $8
   15    25    >   IS_EQUAL                                         ~9      !0, !1
         26      > RETURN                                                   ~9
   16    27*     > RETURN                                                   null

End of function compareentities

Function checkobjectsequals:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/UNsj6
function name:  checkObjectsEquals
number of ops:  18
compiled vars:  !0 = $objectX, !1 = $objectY, !2 = $exclusion
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <array>
   20     3        TYPE_CHECK                                  256  ~3      !0
          4        BOOL_NOT                                         ~4      ~3
          5      > JMPNZ_EX                                         ~4      ~4, ->9
          6    >   TYPE_CHECK                                  256  ~5      !1
          7        BOOL_NOT                                         ~6      ~5
          8        BOOL                                             ~4      ~6
          9    > > JMPZ                                                     ~4, ->11
   21    10    > > RETURN                                                   <false>
   24    11    >   INIT_STATIC_METHOD_CALL                                  'checkObjectsEqualsByReflection'
         12        SEND_VAR_EX                                              !0
         13        SEND_VAR_EX                                              !1
         14        SEND_VAR_EX                                              !2
         15        DO_FCALL                                      0  $7      
         16      > RETURN                                                   $7
   25    17*     > RETURN                                                   null

End of function checkobjectsequals

Function checkarraysequals:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UNsj6
function name:  checkArraysEquals
number of ops:  10
compiled vars:  !0 = $arrayX, !1 = $arrayY, !2 = $exclusion
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <array>
   29     3        INIT_STATIC_METHOD_CALL                                  'checkArraysEqualsByReflection'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        SEND_VAR_EX                                              !2
          7        DO_FCALL                                      0  $3      
          8      > RETURN                                                   $3
   30     9*     > RETURN                                                   null

End of function checkarraysequals

Function checkobjectsequalsbyreflection:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 36
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
2 jumps found. (Code = 77) Position 1 = 39, Position 2 = 127
Branch analysis from position: 39
2 jumps found. (Code = 78) Position 1 = 40, Position 2 = 127
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 52
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 52
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 126
Branch analysis from position: 60
2 jumps found. (Code = 43) Position 1 = 75, Position 2 = 77
Branch analysis from position: 75
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 77
4 jumps found. (Code = 188) Position 1 = 83, Position 2 = 110, Position 3 = 121, Position 4 = 78
Branch analysis from position: 83
2 jumps found. (Code = 46) Position 1 = 98, Position 2 = 106
Branch analysis from position: 98
2 jumps found. (Code = 43) Position 1 = 107, Position 2 = 109
Branch analysis from position: 107
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 109
1 jumps found. (Code = 42) Position 1 = 126
Branch analysis from position: 126
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 106
Branch analysis from position: 110
2 jumps found. (Code = 43) Position 1 = 118, Position 2 = 120
Branch analysis from position: 118
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 120
1 jumps found. (Code = 42) Position 1 = 126
Branch analysis from position: 126
Branch analysis from position: 121
2 jumps found. (Code = 43) Position 1 = 123, Position 2 = 125
Branch analysis from position: 123
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 125
1 jumps found. (Code = 42) Position 1 = 126
Branch analysis from position: 126
Branch analysis from position: 78
2 jumps found. (Code = 44) Position 1 = 80, Position 2 = 83
Branch analysis from position: 80
2 jumps found. (Code = 44) Position 1 = 82, Position 2 = 110
Branch analysis from position: 82
1 jumps found. (Code = 42) Position 1 = 121
Branch analysis from position: 121
Branch analysis from position: 110
Branch analysis from position: 83
Branch analysis from position: 126
Branch analysis from position: 127
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 127
filename:       /in/UNsj6
function name:  checkObjectsEqualsByReflection
number of ops:  130
compiled vars:  !0 = $objectX, !1 = $objectY, !2 = $exclusion, !3 = $visitedObjectHashes, !4 = $reflectionX, !5 = $reflectionY, !6 = $property, !7 = $entityX, !8 = $entityY, !9 = $type, !10 = $alreadyVisited
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <array>
          3        RECV_INIT                                        !3      <array>
   34     4        GET_CLASS                                        ~11     !0
          5        GET_CLASS                                        ~12     !1
          6        IS_NOT_EQUAL                                             ~11, ~12
          7      > JMPZ                                                     ~13, ->9
   35     8    > > RETURN                                                   <false>
   38     9    >   INIT_STATIC_METHOD_CALL                                  'getObjectHash'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $15     
         12        ASSIGN_DIM                                               !3
         13        OP_DATA                                                  $15
   39    14        INIT_STATIC_METHOD_CALL                                  'getObjectHash'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0  $17     
         17        ASSIGN_DIM                                               !3
         18        OP_DATA                                                  $17
   40    19        NEW                                              $18     'ReflectionObject'
         20        SEND_VAR_EX                                              !0
         21        DO_FCALL                                      0          
         22        ASSIGN                                                   !4, $18
   41    23        NEW                                              $21     'ReflectionObject'
         24        SEND_VAR_EX                                              !1
         25        DO_FCALL                                      0          
         26        ASSIGN                                                   !5, $21
   43    27        INIT_METHOD_CALL                                         !4, 'getProperties'
         28        DO_FCALL                                      0  $24     
         29        COUNT                                            ~25     $24
         30        INIT_METHOD_CALL                                         !5, 'getProperties'
         31        DO_FCALL                                      0  $26     
         32        COUNT                                            ~27     $26
         33        IS_NOT_EQUAL                                             ~25, ~27
         34      > JMPZ                                                     ~28, ->36
   44    35    > > RETURN                                                   <false>
   47    36    >   INIT_METHOD_CALL                                         !4, 'getProperties'
         37        DO_FCALL                                      0  $29     
         38      > FE_RESET_R                                       $30     $29, ->127
         39    > > FE_FETCH_R                                               $30, !6, ->127
   48    40    >   INIT_METHOD_CALL                                         !6, 'setAccessible'
         41        SEND_VAL_EX                                              <true>
         42        DO_FCALL                                      0          
   49    43        INIT_METHOD_CALL                                         !5, 'hasProperty'
         44        INIT_METHOD_CALL                                         !6, 'getName'
         45        DO_FCALL                                      0  $32     
         46        SEND_VAR_NO_REF_EX                                       $32
         47        DO_FCALL                                      0  $33     
         48        BOOL_NOT                                         ~34     $33
         49      > JMPZ                                                     ~34, ->52
   50    50    >   FE_FREE                                                  $30
         51      > RETURN                                                   <false>
   52    52    >   INIT_FCALL                                               'in_array'
         53        INIT_METHOD_CALL                                         !6, 'getName'
         54        DO_FCALL                                      0  $35     
         55        SEND_VAR                                                 $35
         56        SEND_VAR                                                 !2
         57        DO_ICALL                                         $36     
         58        BOOL_NOT                                         ~37     $36
         59      > JMPZ                                                     ~37, ->126
   53    60    >   INIT_METHOD_CALL                                         !6, 'getValue'
         61        SEND_VAR_EX                                              !0
         62        DO_FCALL                                      0  $38     
         63        ASSIGN                                                   !7, $38
   54    64        INIT_METHOD_CALL                                         !6, 'getValue'
         65        SEND_VAR_EX                                              !1
         66        DO_FCALL                                      0  $40     
         67        ASSIGN                                                   !8, $40
   55    68        INIT_STATIC_METHOD_CALL                                  'getPairType'
         69        SEND_VAR_EX                                              !7
         70        SEND_VAR_EX                                              !8
         71        DO_FCALL                                      0  $42     
         72        ASSIGN                                           ~43     !9, $42
         73        BOOL_NOT                                         ~44     ~43
         74      > JMPZ                                                     ~44, ->77
   56    75    >   FE_FREE                                                  $30
         76      > RETURN                                                   <false>
   58    77    > > SWITCH_STRING                                            !9, [ 'object':->83, 'array':->110, ], ->121
   59    78    >   IS_EQUAL                                                 !9, 'object'
         79      > JMPNZ                                                    ~45, ->83
   65    80    >   IS_EQUAL                                                 !9, 'array'
         81      > JMPNZ                                                    ~45, ->110
         82    > > JMP                                                      ->121
   60    83    >   INIT_FCALL                                               'array_intersect'
         84        INIT_STATIC_METHOD_CALL                                  'getObjectHash'
         85        SEND_VAR_EX                                              !7
         86        DO_FCALL                                      0  $46     
         87        INIT_ARRAY                                       ~47     $46
         88        INIT_STATIC_METHOD_CALL                                  'getObjectHash'
         89        SEND_VAR_EX                                              !8
         90        DO_FCALL                                      0  $48     
         91        ADD_ARRAY_ELEMENT                                ~47     $48
         92        SEND_VAL                                                 ~47
         93        SEND_VAR                                                 !3
         94        DO_ICALL                                         $49     
         95        ASSIGN                                                   !10, $49
   61    96        BOOL_NOT                                         ~51     !10
         97      > JMPZ_EX                                          ~51     ~51, ->106
         98    >   INIT_STATIC_METHOD_CALL                                  'checkObjectsEqualsByReflection'
         99        SEND_VAR                                                 !7
        100        SEND_VAR                                                 !8
        101        SEND_VAR                                                 !2
        102        SEND_REF                                                 !3
        103        DO_FCALL                                      0  $52     
        104        BOOL_NOT                                         ~53     $52
        105        BOOL                                             ~51     ~53
        106    > > JMPZ                                                     ~51, ->109
   62   107    >   FE_FREE                                                  $30
        108      > RETURN                                                   <false>
   64   109    > > JMP                                                      ->126
   66   110    >   INIT_STATIC_METHOD_CALL                                  'checkArraysEqualsByReflection'
        111        SEND_VAR_EX                                              !7
        112        SEND_VAR_EX                                              !8
        113        SEND_VAR_EX                                              !2
        114        SEND_VAR_EX                                              !3
        115        DO_FCALL                                      0  $54     
        116        BOOL_NOT                                         ~55     $54
        117      > JMPZ                                                     ~55, ->120
   67   118    >   FE_FREE                                                  $30
        119      > RETURN                                                   <false>
   69   120    > > JMP                                                      ->126
   71   121    >   IS_NOT_EQUAL                                             !7, !8
        122      > JMPZ                                                     ~56, ->125
   72   123    >   FE_FREE                                                  $30
        124      > RETURN                                                   <false>
   74   125    > > JMP                                                      ->126
   47   126    > > JMP                                                      ->39
        127    >   FE_FREE                                                  $30
   78   128      > RETURN                                                   <true>
   79   129*     > RETURN                                                   null

End of function checkobjectsequalsbyreflection

Function checkarraysequalsbyreflection:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 78
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 78
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
4 jumps found. (Code = 188) Position 1 = 30, Position 2 = 57, Position 3 = 68, Position 4 = 25
Branch analysis from position: 30
2 jumps found. (Code = 46) Position 1 = 45, Position 2 = 53
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 54, Position 2 = 56
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 53
Branch analysis from position: 57
2 jumps found. (Code = 43) Position 1 = 65, Position 2 = 67
Branch analysis from position: 65
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 67
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
Branch analysis from position: 68
2 jumps found. (Code = 43) Position 1 = 70, Position 2 = 72
Branch analysis from position: 70
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 72
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 57
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 68
Branch analysis from position: 68
Branch analysis from position: 57
Branch analysis from position: 30
Branch analysis from position: 78
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 78
filename:       /in/UNsj6
function name:  checkArraysEqualsByReflection
number of ops:  81
compiled vars:  !0 = $arrayX, !1 = $arrayY, !2 = $exclusion, !3 = $visitedObjectHashes, !4 = $entityY, !5 = $entityX, !6 = $type, !7 = $alreadyVisited
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   81     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <array>
          3        RECV_INIT                                        !3      <array>
   83     4        COUNT                                            ~8      !0
          5        COUNT                                            ~9      !1
          6        IS_NOT_EQUAL                                             ~8, ~9
          7      > JMPZ                                                     ~10, ->9
   84     8    > > RETURN                                                   <false>
   87     9    >   INIT_FCALL                                               'current'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $11     
         12        ASSIGN                                                   !4, $11
   88    13      > FE_RESET_R                                       $13     !0, ->78
         14    > > FE_FETCH_R                                               $13, !5, ->78
   89    15    >   INIT_STATIC_METHOD_CALL                                  'getPairType'
         16        SEND_VAR_EX                                              !5
         17        SEND_VAR_EX                                              !4
         18        DO_FCALL                                      0  $14     
         19        ASSIGN                                           ~15     !6, $14
         20        BOOL_NOT                                         ~16     ~15
         21      > JMPZ                                                     ~16, ->24
   90    22    >   FE_FREE                                                  $13
         23      > RETURN                                                   <false>
   92    24    > > SWITCH_STRING                                            !6, [ 'object':->30, 'array':->57, ], ->68
   93    25    >   IS_EQUAL                                                 !6, 'object'
         26      > JMPNZ                                                    ~17, ->30
   99    27    >   IS_EQUAL                                                 !6, 'array'
         28      > JMPNZ                                                    ~17, ->57
         29    > > JMP                                                      ->68
   94    30    >   INIT_FCALL                                               'array_intersect'
         31        INIT_STATIC_METHOD_CALL                                  'getObjectHash'
         32        SEND_VAR_EX                                              !5
         33        DO_FCALL                                      0  $18     
         34        INIT_ARRAY                                       ~19     $18
         35        INIT_STATIC_METHOD_CALL                                  'getObjectHash'
         36        SEND_VAR_EX                                              !4
         37        DO_FCALL                                      0  $20     
         38        ADD_ARRAY_ELEMENT                                ~19     $20
         39        SEND_VAL                                                 ~19
         40        SEND_VAR                                                 !3
         41        DO_ICALL                                         $21     
         42        ASSIGN                                                   !7, $21
   95    43        BOOL_NOT                                         ~23     !7
         44      > JMPZ_EX                                          ~23     ~23, ->53
         45    >   INIT_STATIC_METHOD_CALL                                  'checkObjectsEqualsByReflection'
         46        SEND_VAR                                                 !5
         47        SEND_VAR                                                 !4
         48        SEND_VAR                                                 !2
         49        SEND_REF                                                 !3
         50        DO_FCALL                                      0  $24     
         51        BOOL_NOT                                         ~25     $24
         52        BOOL                                             ~23     ~25
         53    > > JMPZ                                                     ~23, ->56
   96    54    >   FE_FREE                                                  $13
         55      > RETURN                                                   <false>
   98    56    > > JMP                                                      ->73
  100    57    >   INIT_STATIC_METHOD_CALL                                  'checkArraysEqualsByReflection'
         58        SEND_VAR                                                 !5
         59        SEND_VAR                                                 !4
         60        SEND_VAR                                                 !2
         61        SEND_REF                                                 !3
         62        DO_FCALL                                      0  $26     
         63        BOOL_NOT                                         ~27     $26
         64      > JMPZ                                                     ~27, ->67
  101    65    >   FE_FREE                                                  $13
         66      > RETURN                                                   <false>
  103    67   

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
128.94 ms | 1433 KiB | 21 Q