3v4l.org

run code in 300+ PHP versions simultaneously
<?php $segments1 = ["foo", "bar", "0", ""]; $segments2 = array_filter($segments1, function ($segment) { return $segment !== ''; }); var_export([$segments1, $segments2]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ItTbt
function name:  (null)
number of ops:  13
compiled vars:  !0 = $segments1, !1 = $segments2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
    6     4        SEND_VAL                                                 ~3
    4     5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    8     7        INIT_FCALL                                               'var_export'
          8        INIT_ARRAY                                       ~6      !0
          9        ADD_ARRAY_ELEMENT                                ~6      !1
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
         12      > 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/ItTbt
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $segment
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        IS_NOT_IDENTICAL                                 ~1      !0, ''
          2      > RETURN                                                   ~1
    6     3*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.84 ms | 1433 KiB | 15 Q