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){ echo count($date[$i]); $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 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 7
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 7
Branch analysis from position: 21
Branch analysis from position: 7
Branch analysis from position: 18
filename:       /in/73LoA
function name:  (null)
number of ops:  28
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                                                      ->19
    4     7    >   FETCH_DIM_R                                      ~5      !0, !1
          8        COUNT                                            ~6      ~5
          9        IS_SMALLER                                               ~6, 2
         10      > JMPZ                                                     ~7, ->18
    5    11    >   FETCH_DIM_R                                      ~8      !0, !1
         12        COUNT                                            ~9      ~8
         13        ECHO                                                     ~9
    6    14        FETCH_DIM_R                                      ~11     !0, !1
         15        CONCAT                                           ~12     '0', ~11
         16        ASSIGN_DIM                                               !0, !1
         17        OP_DATA                                                  ~12
    3    18    >   PRE_INC                                                  !1
         19    >   IS_SMALLER                                               !1, 2
         20      > JMPNZ                                                    ~14, ->7
    9    21    >   FETCH_DIM_R                                      ~15     !0, 2
         22        FETCH_DIM_R                                      ~16     !0, 0
         23        CONCAT                                           ~17     ~15, ~16
         24        FETCH_DIM_R                                      ~18     !0, 1
         25        CONCAT                                           ~19     ~17, ~18
         26        ECHO                                                     ~19
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.46 ms | 1396 KiB | 15 Q