3v4l.org

run code in 300+ PHP versions simultaneously
<?php $prefix = (string) 1234; $id = (string) 3; $number = $prefix . str_repeat('0', 12 - strlen($prefix) - strlen($id)) . $id; echo $number;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BruSA
function name:  (null)
number of ops:  17
compiled vars:  !0 = $prefix, !1 = $id, !2 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   CAST                                          6  ~3      1234
          1        ASSIGN                                                   !0, ~3
    3     2        CAST                                          6  ~5      3
          3        ASSIGN                                                   !1, ~5
    5     4        INIT_FCALL                                               'str_repeat'
          5        SEND_VAL                                                 '0'
          6        STRLEN                                           ~7      !0
          7        SUB                                              ~8      12, ~7
          8        STRLEN                                           ~9      !1
          9        SUB                                              ~10     ~8, ~9
         10        SEND_VAL                                                 ~10
         11        DO_ICALL                                         $11     
         12        CONCAT                                           ~12     !0, $11
         13        CONCAT                                           ~13     ~12, !1
         14        ASSIGN                                                   !2, ~13
    7    15        ECHO                                                     !2
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.19 ms | 1394 KiB | 15 Q