3v4l.org

run code in 300+ PHP versions simultaneously
<?php function word_count($sentence){ $array = explode(" ", $sentence); return count($array); } $words = word_count("The is a group of words"); echo $words; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k6GLT
function name:  (null)
number of ops:  6
compiled vars:  !0 = $words
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'word_count'
          1        SEND_VAL                                                 'The+is+a+group+of+words'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
    7     4        ECHO                                                     !0
    8     5      > RETURN                                                   1

Function word_count:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k6GLT
function name:  word_count
number of ops:  9
compiled vars:  !0 = $sentence, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !1, $2
    4     6        COUNT                                            ~4      !1
          7      > RETURN                                                   ~4
    5     8*     > RETURN                                                   null

End of function word_count

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.25 ms | 1389 KiB | 16 Q