3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = str_replace("/", "", '9/28/2007'); // $edrsession->scheduleDate = substr($date, 4, 4).substr($date, 0, 2).substr($date, 2, 2); echo substr($date, 4, 4).substr($date, 0, 2).substr($date, 2, 2); $test = explode('/','9/28/2007'); if(count($test[0]) < 2){ $test[0] = '0'.$test[0]; } var_dump($test[0]);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 37
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/E1gut
function name:  (null)
number of ops:  42
compiled vars:  !0 = $date, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'str_replace'
          1        SEND_VAL                                                 '%2F'
          2        SEND_VAL                                                 ''
          3        SEND_VAL                                                 '9%2F28%2F2007'
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
    4     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 4
          9        SEND_VAL                                                 4
         10        DO_ICALL                                         $4      
         11        INIT_FCALL                                               'substr'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 0
         14        SEND_VAL                                                 2
         15        DO_ICALL                                         $5      
         16        CONCAT                                           ~6      $4, $5
         17        INIT_FCALL                                               'substr'
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 2
         20        SEND_VAL                                                 2
         21        DO_ICALL                                         $7      
         22        CONCAT                                           ~8      ~6, $7
         23        ECHO                                                     ~8
    5    24        INIT_FCALL                                               'explode'
         25        SEND_VAL                                                 '%2F'
         26        SEND_VAL                                                 '9%2F28%2F2007'
         27        DO_ICALL                                         $9      
         28        ASSIGN                                                   !1, $9
    6    29        FETCH_DIM_R                                      ~11     !1, 0
         30        COUNT                                            ~12     ~11
         31        IS_SMALLER                                               ~12, 2
         32      > JMPZ                                                     ~13, ->37
    7    33    >   FETCH_DIM_R                                      ~15     !1, 0
         34        CONCAT                                           ~16     '0', ~15
         35        ASSIGN_DIM                                               !1, 0
         36        OP_DATA                                                  ~16
    9    37    >   INIT_FCALL                                               'var_dump'
         38        FETCH_DIM_R                                      ~17     !1, 0
         39        SEND_VAL                                                 ~17
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.17 ms | 1396 KiB | 21 Q