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 ) ); $array = array(14,22,37,42,58,61,73,82,96,10); print_r(array_splice($array, array_search(58, $array ), 1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rMmlB
function name:  (null)
number of ops:  36
compiled vars:  !0 = $array
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                                         $1      
          5        SEND_VAR                                                 $1
          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%2FrMmlB%3A4%240'
         11        SEND_VAL                                                 ~3
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         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  $6      
         20        SEND_VAR                                                 $6
         21        DO_ICALL                                                 
    6    22        ASSIGN                                                   !0, <array>
    7    23        INIT_FCALL                                               'print_r'
         24        INIT_FCALL                                               'array_splice'
         25        SEND_REF                                                 !0
         26        INIT_FCALL                                               'array_search'
         27        SEND_VAL                                                 58
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $9      
         30        SEND_VAR                                                 $9
         31        SEND_VAL                                                 1
         32        DO_ICALL                                         $10     
         33        SEND_VAR                                                 $10
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FrMmlB%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rMmlB
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%2FrMmlB%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.09 ms | 1404 KiB | 23 Q