3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pos_faktura = "26769891/" . date('Y') . "/000"; $id = (int) substr($pos_faktura, -3); $id++; $nova_faktura = substr($pos_faktura, 0, 14).sprintf("%03d", $id++); echo "$nova_faktura";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gh4Bb
function name:  (null)
number of ops:  28
compiled vars:  !0 = $pos_faktura, !1 = $id, !2 = $nova_faktura
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Y'
          2        DO_ICALL                                         $3      
          3        CONCAT                                           ~4      '26769891%2F', $3
          4        CONCAT                                           ~5      ~4, '%2F000'
          5        ASSIGN                                                   !0, ~5
    4     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 -3
          9        DO_ICALL                                         $7      
         10        CAST                                          4  ~8      $7
         11        ASSIGN                                                   !1, ~8
    5    12        PRE_INC                                                  !1
    6    13        INIT_FCALL                                               'substr'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 14
         17        DO_ICALL                                         $11     
         18        INIT_FCALL                                               'sprintf'
         19        SEND_VAL                                                 '%2503d'
         20        POST_INC                                         ~12     !1
         21        SEND_VAL                                                 ~12
         22        DO_ICALL                                         $13     
         23        CONCAT                                           ~14     $11, $13
         24        ASSIGN                                                   !2, ~14
    7    25        CAST                                          6  ~16     !2
         26        ECHO                                                     ~16
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.88 ms | 1395 KiB | 19 Q