3v4l.org

run code in 300+ PHP versions simultaneously
<?php $intlDateFormatter = new IntlDateFormatter( 'it', 2, -1, 'Europe/Rome', 1, 'dd/MM/yyyy' ); $timezone = $intlDateFormatter->getTimeZone(); var_dump($timezone->getDisplayName()); $intlDateFormatter->setLenient(false); $date = '22/05/1966'; //$intlDateFormatter->setLenient(true); $res = $intlDateFormatter->parse($date, $pos); var_dump($res); var_dump($pos); var_dump($intlDateFormatter->getErrorCode()); var_dump($intlDateFormatter->getErrorMessage()); echo "$date - $res\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZS4vn
function name:  (null)
number of ops:  48
compiled vars:  !0 = $intlDateFormatter, !1 = $timezone, !2 = $date, !3 = $res, !4 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'IntlDateFormatter'
    4     1        SEND_VAL_EX                                              'it'
    5     2        SEND_VAL_EX                                              2
    6     3        SEND_VAL_EX                                              -1
    7     4        SEND_VAL_EX                                              'Europe%2FRome'
    8     5        SEND_VAL_EX                                              1
    9     6        SEND_VAL_EX                                              'dd%2FMM%2Fyyyy'
          7        DO_FCALL                                      0          
    3     8        ASSIGN                                                   !0, $5
   11     9        INIT_METHOD_CALL                                         !0, 'getTimeZone'
         10        DO_FCALL                                      0  $8      
         11        ASSIGN                                                   !1, $8
   12    12        INIT_FCALL                                               'var_dump'
         13        INIT_METHOD_CALL                                         !1, 'getDisplayName'
         14        DO_FCALL                                      0  $10     
         15        SEND_VAR                                                 $10
         16        DO_ICALL                                                 
   13    17        INIT_METHOD_CALL                                         !0, 'setLenient'
         18        SEND_VAL_EX                                              <false>
         19        DO_FCALL                                      0          
   15    20        ASSIGN                                                   !2, '22%2F05%2F1966'
   17    21        INIT_METHOD_CALL                                         !0, 'parse'
         22        SEND_VAR_EX                                              !2
         23        SEND_VAR_EX                                              !4
         24        DO_FCALL                                      0  $14     
         25        ASSIGN                                                   !3, $14
   18    26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                                 
   19    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !4
         31        DO_ICALL                                                 
   20    32        INIT_FCALL                                               'var_dump'
         33        INIT_METHOD_CALL                                         !0, 'getErrorCode'
         34        DO_FCALL                                      0  $18     
         35        SEND_VAR                                                 $18
         36        DO_ICALL                                                 
   21    37        INIT_FCALL                                               'var_dump'
         38        INIT_METHOD_CALL                                         !0, 'getErrorMessage'
         39        DO_FCALL                                      0  $20     
         40        SEND_VAR                                                 $20
         41        DO_ICALL                                                 
   22    42        ROPE_INIT                                     4  ~23     !2
         43        ROPE_ADD                                      1  ~23     ~23, '+-+'
         44        ROPE_ADD                                      2  ~23     ~23, !3
         45        ROPE_END                                      3  ~22     ~23, '%0A'
         46        ECHO                                                     ~22
         47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.19 ms | 1400 KiB | 15 Q