3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = explode("/",'9/28/2007'); for($i=0;$i<2;$i++){ if(count($date[$i]) < 2){ $date[$i] = '0'.$date[$i]; } } echo $date[2].$date[0].$date[1];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 7
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 7
Branch analysis from position: 18
Branch analysis from position: 7
Branch analysis from position: 15
filename:       /in/cqjv0
function name:  (null)
number of ops:  25
compiled vars:  !0 = $date, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '%2F'
          2        SEND_VAL                                                 '9%2F28%2F2007'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    3     5        ASSIGN                                                   !1, 0
          6      > JMP                                                      ->16
    4     7    >   FETCH_DIM_R                                      ~5      !0, !1
          8        COUNT                                            ~6      ~5
          9        IS_SMALLER                                               ~6, 2
         10      > JMPZ                                                     ~7, ->15
    5    11    >   FETCH_DIM_R                                      ~9      !0, !1
         12        CONCAT                                           ~10     '0', ~9
         13        ASSIGN_DIM                                               !0, !1
         14        OP_DATA                                                  ~10
    3    15    >   PRE_INC                                                  !1
         16    >   IS_SMALLER                                               !1, 2
         17      > JMPNZ                                                    ~12, ->7
    8    18    >   FETCH_DIM_R                                      ~13     !0, 2
         19        FETCH_DIM_R                                      ~14     !0, 0
         20        CONCAT                                           ~15     ~13, ~14
         21        FETCH_DIM_R                                      ~16     !0, 1
         22        CONCAT                                           ~17     ~15, ~16
         23        ECHO                                                     ~17
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.02 ms | 1395 KiB | 15 Q