3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.15 ms | 1394 KiB | 15 Q