3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array(new \stdClass(), new \stdClass()); $copy = array(); foreach ($items as $item) { $copy[] = $item; } $udiff = array_udiff($items, $copy, function ($a, $b) { var_dump($a, $b, $a === $b); return $a === $b; }); echo PHP_EOL . 'Array contents' . PHP_EOL . PHP_EOL; var_dump($udiff, $items, $copy);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/TYaUa
function name:  (null)
number of ops:  28
compiled vars:  !0 = $items, !1 = $copy, !2 = $item, !3 = $udiff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~6      $4
          3        NEW                                              $7      'stdClass'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~6      $7
          6        ASSIGN                                                   !0, ~6
    5     7        ASSIGN                                                   !1, <array>
    7     8      > FE_RESET_R                                       $11     !0, ->13
          9    > > FE_FETCH_R                                               $11, !2, ->13
    8    10    >   ASSIGN_DIM                                               !1
         11        OP_DATA                                                  !2
    7    12      > JMP                                                      ->9
         13    >   FE_FREE                                                  $11
   11    14        INIT_FCALL                                               'array_udiff'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !1
         17        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FTYaUa%3A11%240'
   14    18        SEND_VAL                                                 ~13
         19        DO_ICALL                                         $14     
   11    20        ASSIGN                                                   !3, $14
   16    21        ECHO                                                     '%0AArray+contents%0A%0A'
   17    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !3
         24        SEND_VAR                                                 !0
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FTYaUa%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TYaUa
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        IS_IDENTICAL                                     ~2      !0, !1
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
   13     8        IS_IDENTICAL                                     ~4      !0, !1
          9      > RETURN                                                   ~4
   14    10*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FTYaUa%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.39 ms | 1392 KiB | 17 Q