3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = "I have 123 chickens"; $message = preg_replace('/\s*(\d)/', ' $1', $message); $wordcount = str_word_count($message, 0, '0123456789'); echo $wordcount;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e203X
function name:  (null)
number of ops:  15
compiled vars:  !0 = $message, !1 = $wordcount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'I+have+123+chickens'
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5Cs%2A%28%5Cd%29%2F'
          3        SEND_VAL                                                 '+%241'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
    5     7        INIT_FCALL                                               'str_word_count'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 '0123456789'
         11        DO_ICALL                                         $5      
         12        ASSIGN                                                   !1, $5
    6    13        ECHO                                                     !1
    7    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.36 ms | 1010 KiB | 15 Q