3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pos_faktura = "26769891/" . date('Y') . "/000"; $id = (int) substr($pos_faktura, -3); $nova_faktura = substr($pos_faktura, 0, 14).sprintf("03%d", $id++); echo "$nova_faktura";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GdYtN
function name:  (null)
number of ops:  27
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        INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 0
         15        SEND_VAL                                                 14
         16        DO_ICALL                                         $10     
         17        INIT_FCALL                                               'sprintf'
         18        SEND_VAL                                                 '03%25d'
         19        POST_INC                                         ~11     !1
         20        SEND_VAL                                                 ~11
         21        DO_ICALL                                         $12     
         22        CONCAT                                           ~13     $10, $12
         23        ASSIGN                                                   !2, ~13
    6    24        CAST                                          6  ~15     !2
         25        ECHO                                                     ~15
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.54 ms | 1395 KiB | 19 Q