3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tt = !empty($object) ? str_pad($object,4,"0", 0) : "0001"; var_dump($tt);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Len6t
function name:  (null)
number of ops:  17
compiled vars:  !0 = $tt, !1 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ISSET_ISEMPTY_CV                                 ~2      !1
          1        BOOL_NOT                                         ~3      ~2
          2      > JMPZ                                                     ~3, ->11
    3     3    >   INIT_FCALL                                               'str_pad'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 4
          6        SEND_VAL                                                 '0'
          7        SEND_VAL                                                 0
          8        DO_ICALL                                         $4      
          9        QM_ASSIGN                                        ~5      $4
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~5      '0001'
    2    12    >   ASSIGN                                                   !0, ~5
    4    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.37 ms | 1005 KiB | 15 Q