3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime(); $formatted = ""; $arrFormattedBDays = []; $birthdays = ['18-Jul-46','19-Aug-47','1-Jan-19','31-Dec-18']; foreach ($birthdays as $b){ $dt = new DateTime($b); var_dump($dt); $formatted = $dt->format('d/m/19y'); $arrFormattedBDays[] = $formatted; } var_dump($arrFormattedBDays);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 22
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 22
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/LcS5X
function name:  (null)
number of ops:  27
compiled vars:  !0 = $now, !1 = $formatted, !2 = $arrFormattedBDays, !3 = $birthdays, !4 = $b, !5 = $dt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $6      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $6
    3     3        ASSIGN                                                   !1, ''
    4     4        ASSIGN                                                   !2, <array>
    5     5        ASSIGN                                                   !3, <array>
    6     6      > FE_RESET_R                                       $12     !3, ->22
          7    > > FE_FETCH_R                                               $12, !4, ->22
    7     8    >   NEW                                              $13     'DateTime'
          9        SEND_VAR_EX                                              !4
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !5, $13
    8    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !5
         14        DO_ICALL                                                 
    9    15        INIT_METHOD_CALL                                         !5, 'format'
         16        SEND_VAL_EX                                              'd%2Fm%2F19y'
         17        DO_FCALL                                      0  $17     
         18        ASSIGN                                                   !1, $17
   10    19        ASSIGN_DIM                                               !2
         20        OP_DATA                                                  !1
    6    21      > JMP                                                      ->7
         22    >   FE_FREE                                                  $12
   12    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.48 ms | 1010 KiB | 14 Q