3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cha = 'a'; $next_cha = ++$cha; //The following if condition prevent you to go beyond 'z' or 'Z' and will reset to 'a' or 'A'. if (strlen($next_cha) > 1) { $next_cha = $next_cha[0]; } echo $next_cha;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/SYHac
function name:  (null)
number of ops:  10
compiled vars:  !0 = $cha, !1 = $next_cha
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'a'
    3     1        PRE_INC                                          ~3      !0
          2        ASSIGN                                                   !1, ~3
    5     3        STRLEN                                           ~5      !1
          4        IS_SMALLER                                               1, ~5
          5      > JMPZ                                                     ~6, ->8
    7     6    >   FETCH_DIM_R                                      ~7      !1, 0
          7        ASSIGN                                                   !1, ~7
    9     8    >   ECHO                                                     !1
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.07 ms | 1392 KiB | 13 Q