3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.48 ms | 1396 KiB | 15 Q