3v4l.org

run code in 300+ PHP versions simultaneously
<?php $itemList = array( array(new stdClass, new stdClass, new stdClass, new stdClass) ); function doCompare($a, $b) { echo 'A:'; var_dump($a); echo 'B:'; var_dump($b); var_dump($a === $b); return ($a === $b) ? 0 : 1; }; foreach ($itemList as $item) { echo 'Comparing: '; var_dump($item); var_dump(array_udiff($item, $item, 'doCompare')); echo "\n\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 30
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 30
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/WBRj8
function name:  (null)
number of ops:  32
compiled vars:  !0 = $itemList, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~4      $2
          3        NEW                                              $5      'stdClass'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~4      $5
          6        NEW                                              $7      'stdClass'
          7        DO_FCALL                                      0          
          8        ADD_ARRAY_ELEMENT                                ~4      $7
          9        NEW                                              $9      'stdClass'
         10        DO_FCALL                                      0          
         11        ADD_ARRAY_ELEMENT                                ~4      $9
         12        INIT_ARRAY                                       ~11     ~4
    3    13        ASSIGN                                                   !0, ~11
   18    14      > FE_RESET_R                                       $13     !0, ->30
         15    > > FE_FETCH_R                                               $13, !1, ->30
   19    16    >   ECHO                                                     'Comparing%3A+'
   20    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
   21    20        INIT_FCALL                                               'var_dump'
         21        INIT_FCALL                                               'array_udiff'
         22        SEND_VAR                                                 !1
         23        SEND_VAR                                                 !1
         24        SEND_VAL                                                 'doCompare'
         25        DO_ICALL                                         $15     
         26        SEND_VAR                                                 $15
         27        DO_ICALL                                                 
   22    28        ECHO                                                     '%0A%0A'
   18    29      > JMP                                                      ->15
         30    >   FE_FREE                                                  $13
   23    31      > RETURN                                                   1

Function docompare:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WBRj8
function name:  doCompare
number of ops:  21
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        ECHO                                                     'A%3A'
    9     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   10     6        ECHO                                                     'B%3A'
   11     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   13    10        INIT_FCALL                                               'var_dump'
         11        IS_IDENTICAL                                     ~4      !0, !1
         12        SEND_VAL                                                 ~4
         13        DO_ICALL                                                 
   15    14        IS_IDENTICAL                                             !0, !1
         15      > JMPZ                                                     ~6, ->18
         16    >   QM_ASSIGN                                        ~7      0
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~7      1
         19    > > RETURN                                                   ~7
   16    20*     > RETURN                                                   null

End of function docompare

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.37 ms | 1400 KiB | 17 Q