3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tt = !empty($object) ? str_pad($object,4,"0", 0) : str_pad("",4,"0", 0); 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 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kZhS9
function name:  (null)
number of ops:  23
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                                                      ->18
         11    >   INIT_FCALL                                               'str_pad'
         12        SEND_VAL                                                 ''
         13        SEND_VAL                                                 4
         14        SEND_VAL                                                 '0'
         15        SEND_VAL                                                 0
         16        DO_ICALL                                         $6      
         17        QM_ASSIGN                                        ~5      $6
    2    18    >   ASSIGN                                                   !0, ~5
    4    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.56 ms | 1005 KiB | 15 Q