3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '28/05/1972'; $formats = [ 'dd/MM/yyyy', 'd/m/Y', ]; foreach ($formats as $format) { var_dump($format); $intlDateFormatter = new IntlDateFormatter( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN, $format ); $intlDateFormatter->setLenient(false); $intlDateFormatter->parse($date); var_dump($intlDateFormatter->getErrorMessage()); $intlDateFormatter->setLenient(true); $intlDateFormatter->parse($date); var_dump($intlDateFormatter->getErrorMessage()); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 42
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 42
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
filename:       /in/P8MAs
function name:  (null)
number of ops:  44
compiled vars:  !0 = $date, !1 = $formats, !2 = $format, !3 = $intlDateFormatter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '28%2F05%2F1972'
    4     1        ASSIGN                                                   !1, <array>
    9     2      > FE_RESET_R                                       $6      !1, ->42
          3    > > FE_FETCH_R                                               $6, !2, ->42
   10     4    >   INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !2
          6        DO_ICALL                                                 
   11     7        NEW                                              $8      'IntlDateFormatter'
   12     8        SEND_VAL_EX                                              'en_US'
   13     9        FETCH_CLASS_CONSTANT                             ~9      'IntlDateFormatter', 'FULL'
         10        SEND_VAL_EX                                              ~9
   14    11        FETCH_CLASS_CONSTANT                             ~10     'IntlDateFormatter', 'FULL'
         12        SEND_VAL_EX                                              ~10
   15    13        SEND_VAL_EX                                              'America%2FLos_Angeles'
   16    14        FETCH_CLASS_CONSTANT                             ~11     'IntlDateFormatter', 'GREGORIAN'
         15        SEND_VAL_EX                                              ~11
   12    16        SEND_VAR_EX                                              !2
         17        DO_FCALL                                      0          
   11    18        ASSIGN                                                   !3, $8
   21    19        INIT_METHOD_CALL                                         !3, 'setLenient'
         20        SEND_VAL_EX                                              <false>
         21        DO_FCALL                                      0          
   22    22        INIT_METHOD_CALL                                         !3, 'parse'
         23        SEND_VAR_EX                                              !0
         24        DO_FCALL                                      0          
   23    25        INIT_FCALL                                               'var_dump'
         26        INIT_METHOD_CALL                                         !3, 'getErrorMessage'
         27        DO_FCALL                                      0  $16     
         28        SEND_VAR                                                 $16
         29        DO_ICALL                                                 
   25    30        INIT_METHOD_CALL                                         !3, 'setLenient'
         31        SEND_VAL_EX                                              <true>
         32        DO_FCALL                                      0          
   26    33        INIT_METHOD_CALL                                         !3, 'parse'
         34        SEND_VAR_EX                                              !0
         35        DO_FCALL                                      0          
   27    36        INIT_FCALL                                               'var_dump'
         37        INIT_METHOD_CALL                                         !3, 'getErrorMessage'
         38        DO_FCALL                                      0  $20     
         39        SEND_VAR                                                 $20
         40        DO_ICALL                                                 
    9    41      > JMP                                                      ->3
         42    >   FE_FREE                                                  $6
   28    43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184 ms | 1400 KiB | 15 Q