3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Narendra"; $strrev = ""; $i = 0; while(isset($str[$i])){ $strrev = $strrev.$str[$i]; $i++; } echo $strrev;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
Branch analysis from position: 4
filename:       /in/Lb7J0
function name:  (null)
number of ops:  12
compiled vars:  !0 = $str, !1 = $strrev, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Narendra'
    5     1        ASSIGN                                                   !1, ''
    6     2        ASSIGN                                                   !2, 0
    7     3      > JMP                                                      ->8
    8     4    >   FETCH_DIM_R                                      ~6      !0, !2
          5        CONCAT                                           ~7      !1, ~6
          6        ASSIGN                                                   !1, ~7
    9     7        PRE_INC                                                  !2
    7     8    >   ISSET_ISEMPTY_DIM_OBJ                         0          !0, !2
          9      > JMPNZ                                                    ~10, ->4
   11    10    >   ECHO                                                     !1
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.97 ms | 1393 KiB | 13 Q