3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(array_diff(array(312, 401, 1599, 3), array(401) )); // returns [312, 1599, 3] print_r(array_filter(array(312, 401, 1599, 3), function($i){return $i != 401;})); print_r(array_delete( array(312, 401, 1599, 3), 401 ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BaAHN
function name:  (null)
number of ops:  23
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'array_diff'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
    4     7        INIT_FCALL                                               'print_r'
          8        INIT_FCALL                                               'array_filter'
          9        SEND_VAL                                                 <array>
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FBaAHN%3A4%240'
         11        SEND_VAL                                                 ~2
         12        DO_ICALL                                         $3      
         13        SEND_VAR                                                 $3
         14        DO_ICALL                                                 
    5    15        INIT_FCALL                                               'print_r'
         16        INIT_FCALL_BY_NAME                                       'array_delete'
         17        SEND_VAL_EX                                              <array>
         18        SEND_VAL_EX                                              401
         19        DO_FCALL                                      0  $5      
         20        SEND_VAR                                                 $5
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FBaAHN%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BaAHN
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        IS_NOT_EQUAL                                     ~1      !0, 401
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBaAHN%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.16 ms | 1401 KiB | 19 Q