3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "foo bar, php js double-space apo'strophe 9"; echo 'explode(): '; var_export(explode(' ', $input)); echo "\npreg_split(): "; var_export(preg_split('/ +/', $input, null, PREG_SPLIT_NO_EMPTY)); echo "\nstr_word_count(): "; var_export(str_word_count($input, 1)); echo "\npreg_match_all(): "; var_export(preg_match_all('/[a-z]+/', $input, $output) ? $output[0]: []);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 38
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rslib
function name:  (null)
number of ops:  42
compiled vars:  !0 = $input, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'foo+bar%2C+php+js++double-space+apo%27strophe+9'
    4     1        ECHO                                                     'explode%28%29%3A+'
          2        INIT_FCALL                                               'var_export'
          3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                                 
    6     9        ECHO                                                     '%0Apreg_split%28%29%3A+'
         10        INIT_FCALL                                               'var_export'
         11        INIT_FCALL                                               'preg_split'
         12        SEND_VAL                                                 '%2F+%2B%2F'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 null
         15        SEND_VAL                                                 1
         16        DO_ICALL                                         $5      
         17        SEND_VAR                                                 $5
         18        DO_ICALL                                                 
    8    19        ECHO                                                     '%0Astr_word_count%28%29%3A+'
         20        INIT_FCALL                                               'var_export'
         21        INIT_FCALL                                               'str_word_count'
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 1
         24        DO_ICALL                                         $7      
         25        SEND_VAR                                                 $7
         26        DO_ICALL                                                 
   10    27        ECHO                                                     '%0Apreg_match_all%28%29%3A+'
         28        INIT_FCALL                                               'var_export'
         29        INIT_FCALL                                               'preg_match_all'
         30        SEND_VAL                                                 '%2F%5Ba-z%5D%2B%2F'
         31        SEND_VAR                                                 !0
         32        SEND_REF                                                 !1
         33        DO_ICALL                                         $9      
         34      > JMPZ                                                     $9, ->38
         35    >   FETCH_DIM_R                                      ~10     !1, 0
         36        QM_ASSIGN                                        ~11     ~10
         37      > JMP                                                      ->39
         38    >   QM_ASSIGN                                        ~11     <array>
         39    >   SEND_VAL                                                 ~11
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.84 ms | 1007 KiB | 18 Q