3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str1 = "Example-001"; echo str_pad(substr($str1, -3) + 1, 3, 0, STR_PAD_LEFT);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DfKYq
function name:  (null)
number of ops:  14
compiled vars:  !0 = $str1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Example-001'
    5     1        INIT_FCALL                                               'str_pad'
          2        INIT_FCALL                                               'substr'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 -3
          5        DO_ICALL                                         $2      
          6        ADD                                              ~3      $2, 1
          7        SEND_VAL                                                 ~3
          8        SEND_VAL                                                 3
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 0
         11        DO_ICALL                                         $4      
         12        ECHO                                                     $4
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.45 ms | 1394 KiB | 17 Q