3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array(new stdClass, new stdClass, new stdClass); $array2 = array(0, 1, 2); $compareFunction = function($a, $b) { if ($a === $b) { return 0; } elseif ($a > $b) { return 1; } else { return -1; } }; $result = array_udiff($array1, $array1, $compareFunction); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MmKTb
function name:  (null)
number of ops:  23
compiled vars:  !0 = $array1, !1 = $array2, !2 = $compareFunction, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     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        NEW                                              $9      'stdClass'
          7        DO_FCALL                                      0          
          8        ADD_ARRAY_ELEMENT                                ~6      $9
          9        ASSIGN                                                   !0, ~6
    4    10        ASSIGN                                                   !1, <array>
    6    11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FMmKTb%3A6%240'
         12        ASSIGN                                                   !2, ~13
   16    13        INIT_FCALL                                               'array_udiff'
         14        SEND_VAR                                                 !0
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $15     
         18        ASSIGN                                                   !3, $15
   18    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FMmKTb%3A6%240:
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 = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MmKTb
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        IS_IDENTICAL                                             !0, !1
          3      > JMPZ                                                     ~2, ->6
    8     4    > > RETURN                                                   0
          5*       JMP                                                      ->11
    9     6    >   IS_SMALLER                                               !1, !0
          7      > JMPZ                                                     ~3, ->10
   10     8    > > RETURN                                                   1
          9*       JMP                                                      ->11
   12    10    > > RETURN                                                   -1
   14    11*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FMmKTb%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.63 ms | 1392 KiB | 17 Q