3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 'split fiction (n'; $tokens = array_filter(array_map( function ($string) { return preg_replace("/[^a-zA-Z0-9']/", '', trim($string)); }, explode(' ', $value), )); var_dump($tokens);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VVUsQ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $value, !1 = $tokens
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'split+fiction+%28n'
    5     1        INIT_FCALL                                               'array_filter'
          2        INIT_FCALL                                               'array_map'
    6     3        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
    8     4        SEND_VAL                                                 ~3
    9     5        INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '+'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
    5    10        DO_ICALL                                         $5      
    9    11        SEND_VAR                                                 $5
    5    12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !1, $6
   13    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > 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/VVUsQ
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5B%5Ea-zA-Z0-9%27%5D%2F'
          3        SEND_VAL                                                 ''
          4        INIT_FCALL                                               'trim'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                         $2      
          9      > RETURN                                                   $2
    8    10*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.78 ms | 1012 KiB | 19 Q