3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 121; $b = (string)$a; $c = str_split($b); for ($b=0; $b<=count($c);++$b){ $d=array_sum($c); } echo $d;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 9
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 9
Branch analysis from position: 17
Branch analysis from position: 9
filename:       /in/N69XV
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 121
    4     1        CAST                                          6  ~5      !0
          2        ASSIGN                                                   !1, ~5
    5     3        INIT_FCALL                                               'str_split'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !2, $7
    6     7        ASSIGN                                                   !1, 0
          8      > JMP                                                      ->14
    7     9    >   INIT_FCALL                                               'array_sum'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !3, $10
    6    13        PRE_INC                                                  !1
         14    >   COUNT                                            ~13     !2
         15        IS_SMALLER_OR_EQUAL                                      !1, ~13
         16      > JMPNZ                                                    ~14, ->9
   10    17    >   ECHO                                                     !3
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.63 ms | 1395 KiB | 17 Q