3v4l.org

run code in 300+ PHP versions simultaneously
<?php function value_compare_func($a, $b){ if ($a === 'n_3' || $b === 'n_3') { return 0; } return strcmp($a, $b); } $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/td6bE
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array1, !1 = $array2, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   11     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
   12     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 = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/td6bE
function name:  value_compare_func
number of ops:  14
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        IS_IDENTICAL                                     ~2      !0, 'n_3'
          3      > JMPNZ_EX                                         ~2      ~2, ->6
          4    >   IS_IDENTICAL                                     ~3      !1, 'n_3'
          5        BOOL                                             ~2      ~3
          6    > > JMPZ                                                     ~2, ->8
    5     7    > > RETURN                                                   0
    7     8    >   INIT_FCALL                                               'strcmp'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $4      
         12      > RETURN                                                   $4
    8    13*     > RETURN                                                   null

End of function value_compare_func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.94 ms | 1396 KiB | 19 Q