3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rec['birthday'] = '3/11/2001'; $date = explode('/', $rec['birthday']); if(!isset($date[2])){ $new_date = $date[0].'-'.$date[1].'-'.'0000'; } else{ $new_date = $date[0].'-'.$date[1].'-'.$date[2]; } echo $new_date;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/obLjS
function name:  (null)
number of ops:  29
compiled vars:  !0 = $rec, !1 = $date, !2 = $new_date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                               !0, 'birthday'
          1        OP_DATA                                                  '3%2F11%2F2001'
    4     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2F'
          4        FETCH_DIM_R                                      ~4      !0, 'birthday'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    6     8        ISSET_ISEMPTY_DIM_OBJ                         0  ~7      !1, 2
          9        BOOL_NOT                                         ~8      ~7
         10      > JMPZ                                                     ~8, ->19
    7    11    >   FETCH_DIM_R                                      ~9      !1, 0
         12        CONCAT                                           ~10     ~9, '-'
         13        FETCH_DIM_R                                      ~11     !1, 1
         14        CONCAT                                           ~12     ~10, ~11
         15        CONCAT                                           ~13     ~12, '-'
         16        CONCAT                                           ~14     ~13, '0000'
         17        ASSIGN                                                   !2, ~14
         18      > JMP                                                      ->27
   10    19    >   FETCH_DIM_R                                      ~16     !1, 0
         20        CONCAT                                           ~17     ~16, '-'
         21        FETCH_DIM_R                                      ~18     !1, 1
         22        CONCAT                                           ~19     ~17, ~18
         23        CONCAT                                           ~20     ~19, '-'
         24        FETCH_DIM_R                                      ~21     !1, 2
         25        CONCAT                                           ~22     ~20, ~21
         26        ASSIGN                                                   !2, ~22
   12    27    >   ECHO                                                     !2
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.58 ms | 1396 KiB | 15 Q