3v4l.org

run code in 300+ PHP versions simultaneously
<?php function value_compare_func($a, $b){ // var_dump($a, $b); if ($a === 'n_3') { return 0; } return 1; } $array1 = array("n_1", "n_2", "n_3", "n_4" ); $array2 = array("green"); $result = array_udiff($array1, $array2, "value_compare_func"); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JMZMY
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array1, !1 = $array2, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   12     2        INIT_FCALL                                               'array_udiff'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 'value_compare_func'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
   13     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function value_compare_func:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JMZMY
function name:  value_compare_func
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        IS_IDENTICAL                                             !0, 'n_3'
          3      > JMPZ                                                     ~2, ->5
    6     4    > > RETURN                                                   0
    8     5    > > RETURN                                                   1
    9     6*     > RETURN                                                   null

End of function value_compare_func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.76 ms | 1395 KiB | 17 Q