3v4l.org

run code in 500+ PHP versions simultaneously
<?php $begin = new DateTime('1900-01-01'); $end = new DateTime('2100-01-01'); $interval = DateInterval::createFromDateString('1 day'); $period = new DatePeriod($begin, $interval, $end); $intlDateFormatter = new IntlDateFormatter("en_US", IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE, "Europe/Malta", 1, "dd/MM/yyyy"); $intlDateFormatter->setLenient(false); foreach ($period as $dt) { $formattedDate = $dt->format("d/m/Y"); $timestamp = $intlDateFormatter->parse($formattedDate); if (intl_get_error_code() != 0) { echo $formattedDate."\n"; echo intl_get_error_message()."\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 33, Position 2 = 53
Branch analysis from position: 33
2 jumps found. (Code = 78) Position 1 = 34, Position 2 = 53
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 52
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 52
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
filename:       /in/GZlSs
function name:  (null)
number of ops:  55
compiled vars:  !0 = $begin, !1 = $end, !2 = $interval, !3 = $period, !4 = $intlDateFormatter, !5 = $dt, !6 = $formattedDate, !7 = $timestamp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $8      'DateTime'
          1        SEND_VAL_EX                                                  '1900-01-01'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $8
    4     4        NEW                                                  $11     'DateTime'
          5        SEND_VAL_EX                                                  '2100-01-01'
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $11
    6     8        INIT_STATIC_METHOD_CALL                                      'DateInterval', 'createFromDateString'
          9        SEND_VAL                                                     '1+day'
         10        DO_FCALL                                          0  $14     
         11        ASSIGN                                                       !2, $14
    7    12        NEW                                                  $16     'DatePeriod'
         13        SEND_VAR_EX                                                  !0
         14        SEND_VAR_EX                                                  !2
         15        SEND_VAR_EX                                                  !1
         16        DO_FCALL                                          0          
         17        ASSIGN                                                       !3, $16
    9    18        NEW                                                  $19     'IntlDateFormatter'
         19        SEND_VAL_EX                                                  'en_US'
         20        FETCH_CLASS_CONSTANT                                 ~20     'IntlDateFormatter', 'MEDIUM'
         21        SEND_VAL_EX                                                  ~20
         22        FETCH_CLASS_CONSTANT                                 ~21     'IntlDateFormatter', 'NONE'
         23        SEND_VAL_EX                                                  ~21
         24        SEND_VAL_EX                                                  'Europe%2FMalta'
         25        SEND_VAL_EX                                                  1
         26        SEND_VAL_EX                                                  'dd%2FMM%2Fyyyy'
         27        DO_FCALL                                          0          
         28        ASSIGN                                                       !4, $19
   10    29        INIT_METHOD_CALL                                             !4, 'setLenient'
         30        SEND_VAL_EX                                                  <false>
         31        DO_FCALL                                          0          
   12    32      > FE_RESET_R                                           $25     !3, ->53
         33    > > FE_FETCH_R                                                   $25, !5, ->53
   14    34    >   INIT_METHOD_CALL                                             !5, 'format'
         35        SEND_VAL_EX                                                  'd%2Fm%2FY'
         36        DO_FCALL                                          0  $26     
         37        ASSIGN                                                       !6, $26
   15    38        INIT_METHOD_CALL                                             !4, 'parse'
         39        SEND_VAR_EX                                                  !6
         40        DO_FCALL                                          0  $28     
         41        ASSIGN                                                       !7, $28
   17    42        INIT_FCALL_BY_NAME                                           'intl_get_error_code'
         43        DO_FCALL                                          0  $30     
         44        IS_NOT_EQUAL                                                 $30, 0
         45      > JMPZ                                                         ~31, ->52
   18    46    >   CONCAT                                               ~32     !6, '%0A'
         47        ECHO                                                         ~32
   19    48        INIT_FCALL_BY_NAME                                           'intl_get_error_message'
         49        DO_FCALL                                          0  $33     
         50        CONCAT                                               ~34     $33, '%0A'
         51        ECHO                                                         ~34
   12    52    > > JMP                                                          ->33
         53    >   FE_FREE                                                      $25
   21    54      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
149.31 ms | 2179 KiB | 8 Q