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); 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/Ui92h
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
   16    14      > FE_RESET_R                                       $13     !0, ->30
         15    > > FE_FETCH_R                                               $13, !1, ->30
   17    16    >   ECHO                                                     'Comparing%3A+'
   18    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
   19    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                                                 
   20    28        ECHO                                                     '%0A%0A'
   16    29      > JMP                                                      ->15
         30    >   FE_FREE                                                  $13
   21    31      > RETURN                                                   1

Function docompare:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ui92h
function name:  doCompare
number of ops:  17
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        IS_IDENTICAL                                             !0, !1
         11      > JMPZ                                                     ~4, ->14
         12    >   QM_ASSIGN                                        ~5      0
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~5      1
         15    > > RETURN                                                   ~5
   14    16*     > RETURN                                                   null

End of function docompare

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.61 ms | 1405 KiB | 17 Q