3v4l.org

run code in 300+ PHP versions simultaneously
<?php $itemList = array( array(new stdClass), array(new stdClass, new stdClass), array(new stdClass, new stdClass, new stdClass), array(new stdClass, new stdClass, new stdClass, new stdClass) ); function doCompare($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 = 36, Position 2 = 51
Branch analysis from position: 36
2 jumps found. (Code = 78) Position 1 = 37, Position 2 = 51
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 51
filename:       /in/kq735
function name:  (null)
number of ops:  53
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        INIT_ARRAY                                       ~5      ~4
    5     4        NEW                                              $6      'stdClass'
          5        DO_FCALL                                      0          
          6        INIT_ARRAY                                       ~8      $6
          7        NEW                                              $9      'stdClass'
          8        DO_FCALL                                      0          
          9        ADD_ARRAY_ELEMENT                                ~8      $9
         10        ADD_ARRAY_ELEMENT                                ~5      ~8
    6    11        NEW                                              $11     'stdClass'
         12        DO_FCALL                                      0          
         13        INIT_ARRAY                                       ~13     $11
         14        NEW                                              $14     'stdClass'
         15        DO_FCALL                                      0          
         16        ADD_ARRAY_ELEMENT                                ~13     $14
         17        NEW                                              $16     'stdClass'
         18        DO_FCALL                                      0          
         19        ADD_ARRAY_ELEMENT                                ~13     $16
         20        ADD_ARRAY_ELEMENT                                ~5      ~13
    7    21        NEW                                              $18     'stdClass'
         22        DO_FCALL                                      0          
         23        INIT_ARRAY                                       ~20     $18
         24        NEW                                              $21     'stdClass'
         25        DO_FCALL                                      0          
         26        ADD_ARRAY_ELEMENT                                ~20     $21
         27        NEW                                              $23     'stdClass'
         28        DO_FCALL                                      0          
         29        ADD_ARRAY_ELEMENT                                ~20     $23
         30        NEW                                              $25     'stdClass'
         31        DO_FCALL                                      0          
         32        ADD_ARRAY_ELEMENT                                ~20     $25
         33        ADD_ARRAY_ELEMENT                                ~5      ~20
    3    34        ASSIGN                                                   !0, ~5
   14    35      > FE_RESET_R                                       $28     !0, ->51
         36    > > FE_FETCH_R                                               $28, !1, ->51
   15    37    >   ECHO                                                     'Comparing%3A+'
   16    38        INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !1
         40        DO_ICALL                                                 
   17    41        INIT_FCALL                                               'var_dump'
         42        INIT_FCALL                                               'array_udiff'
         43        SEND_VAR                                                 !1
         44        SEND_VAR                                                 !1
         45        SEND_VAL                                                 'doCompare'
         46        DO_ICALL                                         $30     
         47        SEND_VAR                                                 $30
         48        DO_ICALL                                                 
   18    49        ECHO                                                     '%0A%0A'
   14    50      > JMP                                                      ->36
         51    >   FE_FREE                                                  $28
   19    52      > RETURN                                                   1

Function docompare:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kq735
function name:  doCompare
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        IS_IDENTICAL                                             !0, !1
          3      > JMPZ                                                     ~2, ->6
          4    >   QM_ASSIGN                                        ~3      0
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      1
          7    > > RETURN                                                   ~3
   12     8*     > RETURN                                                   null

End of function docompare

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.15 ms | 1400 KiB | 17 Q