3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array1 = [1, 2, 3]; $array2 = [4, 5, 6]; function udiffCompare($a, $b) { echo "Compare $a and $b\n"; } var_export( array_udiff($array1, $array2, 'udiffCompare') ); echo "\n---\n"; function udiffCompare2($a, $b) { echo "Compare $a and $b\n"; return $a <=> $b; } var_export( array_udiff($array1, $array2, 'udiffCompare2') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OgHVv
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array1, !1 = $array2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, <array>
   10     2        INIT_FCALL                                                   'var_export'
   11     3        INIT_FCALL                                                   'array_udiff'
          4        SEND_VAR                                                     !0
          5        SEND_VAR                                                     !1
          6        SEND_VAL                                                     'udiffCompare'
          7        DO_ICALL                                             $4      
          8        SEND_VAR                                                     $4
   10     9        DO_ICALL                                                     
   14    10        ECHO                                                         '%0A---%0A'
   21    11        INIT_FCALL                                                   'var_export'
   22    12        INIT_FCALL                                                   'array_udiff'
         13        SEND_VAR                                                     !0
         14        SEND_VAR                                                     !1
         15        SEND_VAL                                                     'udiffCompare2'
         16        DO_ICALL                                             $6      
         17        SEND_VAR                                                     $6
   21    18        DO_ICALL                                                     
   23    19      > RETURN                                                       1

Function udiffcompare:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OgHVv
function name:  udiffCompare
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    8     2        ROPE_INIT                                         5  ~3      'Compare+'
          3        ROPE_ADD                                          1  ~3      ~3, !0
          4        ROPE_ADD                                          2  ~3      ~3, '+and+'
          5        ROPE_ADD                                          3  ~3      ~3, !1
          6        ROPE_END                                          4  ~2      ~3, '%0A'
          7        ECHO                                                         ~2
    9     8      > RETURN                                                       null

End of function udiffcompare

Function udiffcompare2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OgHVv
function name:  udiffCompare2
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   18     2        ROPE_INIT                                         5  ~3      'Compare+'
          3        ROPE_ADD                                          1  ~3      ~3, !0
          4        ROPE_ADD                                          2  ~3      ~3, '+and+'
          5        ROPE_ADD                                          3  ~3      ~3, !1
          6        ROPE_END                                          4  ~2      ~3, '%0A'
          7        ECHO                                                         ~2
   19     8        SPACESHIP                                            ~6      !0, !1
          9      > RETURN                                                       ~6
   20    10*     > RETURN                                                       null

End of function udiffcompare2

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
186.38 ms | 1627 KiB | 15 Q