3v4l.org

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

Function docompare:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YLPBf
function name:  doCompare
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        IS_IDENTICAL                                     ~2      !0, !1
          3      > RETURN                                                   ~2
   16     4*     > RETURN                                                   null

End of function docompare

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.84 ms | 1400 KiB | 17 Q