3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array(new \stdClass(), new \stdClass()); $copy = array(); foreach ($items as $item) { $copy[] = $item; } $diff = array_udiff($items, $copy, function ($a, $b) { return $a === $b; }); var_dump($diff, $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/eHJ0E
function name:  (null)
number of ops:  27
compiled vars:  !0 = $items, !1 = $copy, !2 = $item, !3 = $diff
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%2FeHJ0E%3A11%240'
   13    18        SEND_VAL                                                 ~13
         19        DO_ICALL                                         $14     
   11    20        ASSIGN                                                   !3, $14
   15    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !3
         23        SEND_VAR                                                 !0
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FeHJ0E%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eHJ0E
function name:  {closure}
number of ops:  5
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        IS_IDENTICAL                                     ~2      !0, !1
          3      > RETURN                                                   ~2
   13     4*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.95 ms | 1388 KiB | 17 Q