3v4l.org

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

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

End of function docompare

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.13 ms | 1405 KiB | 17 Q