3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(str_increment('AA')); var_dump(str_increment('AA', 1)); // expected: 'AB' var_dump(str_increment('AA', 3)); // expected: 'AD' var_dump(str_decrement('AA')); var_dump(str_increment('AA', -1)); // expected: 'Z'
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6XDF6
function name:  (null)
number of ops:  34
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'str_increment'
          2        SEND_VAL                                                 'AA'
          3        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    4     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'str_increment'
          8        SEND_VAL                                                 'AA'
          9        SEND_VAL                                                 1
         10        DO_ICALL                                         $2      
         11        SEND_VAR                                                 $2
         12        DO_ICALL                                                 
    5    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'str_increment'
         15        SEND_VAL                                                 'AA'
         16        SEND_VAL                                                 3
         17        DO_ICALL                                         $4      
         18        SEND_VAR                                                 $4
         19        DO_ICALL                                                 
    7    20        INIT_FCALL                                               'var_dump'
         21        INIT_FCALL                                               'str_decrement'
         22        SEND_VAL                                                 'AA'
         23        DO_ICALL                                         $6      
         24        SEND_VAR                                                 $6
         25        DO_ICALL                                                 
    8    26        INIT_FCALL                                               'var_dump'
         27        INIT_FCALL                                               'str_increment'
         28        SEND_VAL                                                 'AA'
         29        SEND_VAL                                                 -1
         30        DO_ICALL                                         $8      
         31        SEND_VAR                                                 $8
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.36 ms | 1003 KiB | 16 Q