3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = " one! two:\tthree; \"four\" "; print_r(str_word_count($str, 1)); print_r(preg_split("/\b.+?\b/",trim($str))); print_r(array_filter(explode(' ', implode(' ', array_map('trim', explode("\n", $str))))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TI3Jk
function name:  (null)
number of ops:  41
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%0A++++one%21%0A++++two%3A%09three%3B%0A++++%22four%22%0A'
    9     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'str_word_count'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
   10     8        INIT_FCALL                                               'print_r'
          9        INIT_FCALL                                               'preg_split'
         10        SEND_VAL                                                 '%2F%5Cb.%2B%3F%5Cb%2F'
         11        INIT_FCALL                                               'trim'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
         15        DO_ICALL                                         $5      
         16        SEND_VAR                                                 $5
         17        DO_ICALL                                                 
   11    18        INIT_FCALL                                               'print_r'
         19        INIT_FCALL                                               'array_filter'
         20        INIT_FCALL                                               'explode'
         21        SEND_VAL                                                 '+'
         22        INIT_FCALL                                               'implode'
         23        SEND_VAL                                                 '+'
         24        INIT_FCALL                                               'array_map'
         25        SEND_VAL                                                 'trim'
         26        INIT_FCALL                                               'explode'
         27        SEND_VAL                                                 '%0A'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $7      
         30        SEND_VAR                                                 $7
         31        DO_ICALL                                         $8      
         32        SEND_VAR                                                 $8
         33        DO_ICALL                                         $9      
         34        SEND_VAR                                                 $9
         35        DO_ICALL                                         $10     
         36        SEND_VAR                                                 $10
         37        DO_ICALL                                         $11     
         38        SEND_VAR                                                 $11
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
204.13 ms | 1396 KiB | 29 Q