3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = array( 'foo', 'bar', 'baz', ); $filtered_array = array_filter( $array, fn ( $value ) => $value !== 'bar', ); var_dump( $filtered_array ); echo "New: "; echo array_last( $filtered_array ); echo "Old: "; echo $filtered_array[ count( $filtered_array ) - 1 ];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cMG4N
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array, !1 = $filtered_array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    9     1        INIT_FCALL                                                   'array_filter'
   10     2        SEND_VAR                                                     !0
   11     3        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          4        SEND_VAL                                                     ~3
    9     5        DO_ICALL                                             $4      
          6        ASSIGN                                                       !1, $4
   14     7        INIT_FCALL                                                   'var_dump'
          8        SEND_VAR                                                     !1
          9        DO_ICALL                                                     
   16    10        ECHO                                                         'New%3A+'
   17    11        INIT_FCALL                                                   'array_last'
         12        SEND_VAR                                                     !1
         13        DO_ICALL                                             $7      
         14        ECHO                                                         $7
   19    15        ECHO                                                         'Old%3A+'
   20    16        COUNT                                                ~8      !1
         17        SUB                                                  ~9      ~8, 1
         18        FETCH_DIM_R                                          ~10     !1, ~9
         19        ECHO                                                         ~10
         20      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cMG4N
function name:  {closure:/in/cMG4N:11}
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
          1        IS_NOT_IDENTICAL                                     ~1      !0, 'bar'
          2      > RETURN                                                       ~1
          3*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.5 ms | 1161 KiB | 16 Q