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', 2, -1, 'Europe/Rome', 1, $format); $intlDateFormatter->setLenient(false); $res = $intlDateFormatter->parse($date); var_dump($intlDateFormatter->getErrorMessage(), $res); $intlDateFormatter->setLenient(true); $res = $intlDateFormatter->parse($date); var_dump($intlDateFormatter->getErrorMessage(), $res); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 40
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 40
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
filename:       /in/Yaqel
function name:  (null)
number of ops:  42
compiled vars:  !0 = $date, !1 = $formats, !2 = $format, !3 = $intlDateFormatter, !4 = $res
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                                       $7      !1, ->40
          3    > > FE_FETCH_R                                               $7, !2, ->40
   10     4    >   NEW                                              $8      '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, $8
   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  $12     
         19        ASSIGN                                                   !4, $12
   14    20        INIT_FCALL                                               'var_dump'
         21        INIT_METHOD_CALL                                         !3, 'getErrorMessage'
         22        DO_FCALL                                      0  $14     
         23        SEND_VAR                                                 $14
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                                 
   16    26        INIT_METHOD_CALL                                         !3, 'setLenient'
         27        SEND_VAL_EX                                              <true>
         28        DO_FCALL                                      0          
   17    29        INIT_METHOD_CALL                                         !3, 'parse'
         30        SEND_VAR_EX                                              !0
         31        DO_FCALL                                      0  $17     
         32        ASSIGN                                                   !4, $17
   18    33        INIT_FCALL                                               'var_dump'
         34        INIT_METHOD_CALL                                         !3, 'getErrorMessage'
         35        DO_FCALL                                      0  $19     
         36        SEND_VAR                                                 $19
         37        SEND_VAR                                                 !4
         38        DO_ICALL                                                 
    9    39      > JMP                                                      ->3
         40    >   FE_FREE                                                  $7
   19    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.75 ms | 1405 KiB | 15 Q