3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text="one #two three #four #five"; $parts = array_filter( explode(' ', $text), function($word) {return strpos($word,"#")===0;} ); print_r($parts);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YBnu3
function name:  (null)
number of ops:  15
compiled vars:  !0 = $text, !1 = $parts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'one+%23two+three+%23four+%23five'
    4     1        INIT_FCALL                                               'array_filter'
    5     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
    6     7        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          8        SEND_VAL                                                 ~4
    4     9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
    8    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > 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/YBnu3
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%23'
          4        DO_ICALL                                         $1      
          5        IS_IDENTICAL                                     ~2      $1, 0
          6      > RETURN                                                   ~2
          7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.5 ms | 1073 KiB | 17 Q