3v4l.org

run code in 500+ PHP versions simultaneously
<?php function my_word_count($text) { preg_match_all("(\w+)u", $text, $matches); return count($matches[0]); } var_dump(my_word_count('мама'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/95BuEK
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                                   'var_dump'
          1        INIT_FCALL                                                   'my_word_count'
          2        SEND_VAL                                                     '%D0%BC%D0%B0%D0%BC%D0%B0'
          3        DO_FCALL                                          0  $0      
          4        SEND_VAR                                                     $0
          5        DO_ICALL                                                     
          6      > RETURN                                                       1

Function my_word_count:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/95BuEK
function name:  my_word_count
number of ops:  10
compiled vars:  !0 = $text, !1 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        INIT_FCALL                                                   'preg_match_all'
          2        SEND_VAL                                                     '%28%5Cw%2B%29u'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                                     
    5     6        FETCH_DIM_R                                          ~3      !1, 0
          7        COUNT                                                ~4      ~3
          8      > RETURN                                                       ~4
    6     9*     > RETURN                                                       null

End of function my_word_count

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.69 ms | 482 KiB | 10 Q