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) { $intlDateFormatter = new IntlDateFormatter( 'it', IntlDateFormatter::SHORT, IntlDateFormatter::NONE, 'Europe/Rome', IntlDateFormatter::GREGORIAN ); $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 = 38
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 38
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/L160E
function name:  (null)
number of ops:  40
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, ->38
          3    > > FE_FETCH_R                                               $6, !2, ->38
   10     4    >   NEW                                              $7      'IntlDateFormatter'
   11     5        SEND_VAL_EX                                              'it'
   12     6        FETCH_CLASS_CONSTANT                             ~8      'IntlDateFormatter', 'SHORT'
          7        SEND_VAL_EX                                              ~8
   13     8        FETCH_CLASS_CONSTANT                             ~9      'IntlDateFormatter', 'NONE'
          9        SEND_VAL_EX                                              ~9
   14    10        SEND_VAL_EX                                              'Europe%2FRome'
   15    11        FETCH_CLASS_CONSTANT                             ~10     'IntlDateFormatter', 'GREGORIAN'
         12        SEND_VAL_EX                                              ~10
         13        DO_FCALL                                      0          
   10    14        ASSIGN                                                   !3, $7
   19    15        INIT_METHOD_CALL                                         !3, 'setLenient'
         16        SEND_VAL_EX                                              <false>
         17        DO_FCALL                                      0          
   20    18        INIT_METHOD_CALL                                         !3, 'parse'
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0          
   21    21        INIT_FCALL                                               'var_dump'
         22        INIT_METHOD_CALL                                         !3, 'getErrorMessage'
         23        DO_FCALL                                      0  $15     
         24        SEND_VAR                                                 $15
         25        DO_ICALL                                                 
   23    26        INIT_METHOD_CALL                                         !3, 'setLenient'
         27        SEND_VAL_EX                                              <true>
         28        DO_FCALL                                      0          
   24    29        INIT_METHOD_CALL                                         !3, 'parse'
         30        SEND_VAR_EX                                              !0
         31        DO_FCALL                                      0          
   25    32        INIT_FCALL                                               'var_dump'
         33        INIT_METHOD_CALL                                         !3, 'getErrorMessage'
         34        DO_FCALL                                      0  $19     
         35        SEND_VAR                                                 $19
         36        DO_ICALL                                                 
    9    37      > JMP                                                      ->3
         38    >   FE_FREE                                                  $6
   26    39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.03 ms | 1400 KiB | 15 Q