3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'hello world!'; $output = ''; for ($i = 0; $i < strlen($string); $i++) { $output .= chr(substr($string, 1, $i)); } echo $output;
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 = 4
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 4
Branch analysis from position: 17
Branch analysis from position: 4
filename:       /in/II3pY
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $output, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'hello+world%21'
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->14
    5     4    >   INIT_FCALL                                               'chr'
          5        INIT_FCALL                                               'substr'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 1
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                         $7      
         12        ASSIGN_OP                                     8          !1, $7
    4    13        PRE_INC                                                  !2
         14    >   STRLEN                                           ~10     !0
         15        IS_SMALLER                                               !2, ~10
         16      > JMPNZ                                                    ~11, ->4
    7    17    >   ECHO                                                     !1
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.48 ms | 1395 KiB | 17 Q