3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '28/5/1972'; $formats = [ 'dd/MM/yyyy', 'd/m/YYYY', ]; foreach ($formats as $format) { $intlDateFormatter = new IntlDateFormatter('it', 2, -1, 'Europe/Rome', 1, $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 = 36
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 36
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/jKU0c
function name:  (null)
number of ops:  38
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%2F5%2F1972'
    4     1        ASSIGN                                                   !1, <array>
    9     2      > FE_RESET_R                                       $6      !1, ->36
          3    > > FE_FETCH_R                                               $6, !2, ->36
   10     4    >   NEW                                              $7      'IntlDateFormatter'
          5        SEND_VAL_EX                                              'it'
          6        SEND_VAL_EX                                              2
          7        SEND_VAL_EX                                              -1
          8        SEND_VAL_EX                                              'Europe%2FRome'
          9        SEND_VAL_EX                                              1
         10        SEND_VAR_EX                                              !2
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !3, $7
   12    13        INIT_METHOD_CALL                                         !3, 'setLenient'
         14        SEND_VAL_EX                                              <false>
         15        DO_FCALL                                      0          
   13    16        INIT_METHOD_CALL                                         !3, 'parse'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0          
   14    19        INIT_FCALL                                               'var_dump'
         20        INIT_METHOD_CALL                                         !3, 'getErrorMessage'
         21        DO_FCALL                                      0  $12     
         22        SEND_VAR                                                 $12
         23        DO_ICALL                                                 
   16    24        INIT_METHOD_CALL                                         !3, 'setLenient'
         25        SEND_VAL_EX                                              <true>
         26        DO_FCALL                                      0          
   17    27        INIT_METHOD_CALL                                         !3, 'parse'
         28        SEND_VAR_EX                                              !0
         29        DO_FCALL                                      0          
   18    30        INIT_FCALL                                               'var_dump'
         31        INIT_METHOD_CALL                                         !3, 'getErrorMessage'
         32        DO_FCALL                                      0  $16     
         33        SEND_VAR                                                 $16
         34        DO_ICALL                                                 
    9    35      > JMP                                                      ->3
         36    >   FE_FREE                                                  $6
   19    37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.2 ms | 1396 KiB | 15 Q