3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = "This is a test string, which is used for demonstrating the tokenization using PHP. PHP is a very (strong) scripting-language"; $words = array_unique(str_word_count(preg_replace('/-/', ' ', $content), 1)); print "<pre>"; print_r($words); print "</pre>"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5dEQ7
function name:  (null)
number of ops:  20
compiled vars:  !0 = $content, !1 = $words
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'This+is+a+test+string%2C+which+is+used+for%0Ademonstrating+the+tokenization+using+PHP.+PHP+is+a+very+%28strong%29+scripting-language'
    7     1        INIT_FCALL                                               'array_unique'
          2        INIT_FCALL                                               'str_word_count'
          3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAL                                                 '%2F-%2F'
          5        SEND_VAL                                                 '+'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        SEND_VAL                                                 1
         10        DO_ICALL                                         $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                         $5      
         13        ASSIGN                                                   !1, $5
    9    14        ECHO                                                     '%3Cpre%3E'
   10    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   11    18        ECHO                                                     '%3C%2Fpre%3E'
   12    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.27 ms | 1395 KiB | 21 Q