3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str1 = "AWK-JES-0099"; $parts = explode("-",$str1); echo sprintf($parts[0] .$parts[1] . '-%04d', $parts[2]+1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8h86i
function name:  (null)
number of ops:  18
compiled vars:  !0 = $str1, !1 = $parts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'AWK-JES-0099'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '-'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    6     6        INIT_FCALL                                               'sprintf'
          7        FETCH_DIM_R                                      ~5      !1, 0
          8        FETCH_DIM_R                                      ~6      !1, 1
          9        CONCAT                                           ~7      ~5, ~6
         10        CONCAT                                           ~8      ~7, '-%2504d'
         11        SEND_VAL                                                 ~8
         12        FETCH_DIM_R                                      ~9      !1, 2
         13        ADD                                              ~10     ~9, 1
         14        SEND_VAL                                                 ~10
         15        DO_ICALL                                         $11     
         16        ECHO                                                     $11
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.88 ms | 1394 KiB | 17 Q