3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(date_default_timezone_get()); $intlDateFormatter = new IntlDateFormatter( 'en_US', IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE, 'Asia/Nicosia', IntlDateFormatter::GREGORIAN, 'yyyy-MM-dd' ); $intlDateFormatter->setLenient(false); $date = '1990-03-24'; $res = $intlDateFormatter->parse($date); echo "$date - $res\n"; // 1990-03-24 - 638229600 $date = '1990-03-25 15:00:00'; //$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"; // 1990-03-25 - $date = '1990-03-26'; $res = $intlDateFormatter->parse($date); echo "$date - $res\n"; // 1990-03-26 - 638398800
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ft60W
function name:  (null)
number of ops:  68
compiled vars:  !0 = $intlDateFormatter, !1 = $date, !2 = $res, !3 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'date_default_timezone_get'
          2        DO_ICALL                                         $4      
          3        SEND_VAR                                                 $4
          4        DO_ICALL                                                 
    3     5        NEW                                              $6      'IntlDateFormatter'
    4     6        SEND_VAL_EX                                              'en_US'
    5     7        FETCH_CLASS_CONSTANT                             ~7      'IntlDateFormatter', 'MEDIUM'
          8        SEND_VAL_EX                                              ~7
    6     9        FETCH_CLASS_CONSTANT                             ~8      'IntlDateFormatter', 'NONE'
         10        SEND_VAL_EX                                              ~8
    7    11        SEND_VAL_EX                                              'Asia%2FNicosia'
    8    12        FETCH_CLASS_CONSTANT                             ~9      'IntlDateFormatter', 'GREGORIAN'
         13        SEND_VAL_EX                                              ~9
    9    14        SEND_VAL_EX                                              'yyyy-MM-dd'
         15        DO_FCALL                                      0          
    3    16        ASSIGN                                                   !0, $6
   11    17        INIT_METHOD_CALL                                         !0, 'setLenient'
         18        SEND_VAL_EX                                              <false>
         19        DO_FCALL                                      0          
   13    20        ASSIGN                                                   !1, '1990-03-24'
   14    21        INIT_METHOD_CALL                                         !0, 'parse'
         22        SEND_VAR_EX                                              !1
         23        DO_FCALL                                      0  $14     
         24        ASSIGN                                                   !2, $14
   16    25        ROPE_INIT                                     4  ~17     !1
         26        ROPE_ADD                                      1  ~17     ~17, '+-+'
         27        ROPE_ADD                                      2  ~17     ~17, !2
         28        ROPE_END                                      3  ~16     ~17, '%0A'
         29        ECHO                                                     ~16
   18    30        ASSIGN                                                   !1, '1990-03-25+15%3A00%3A00'
   20    31        INIT_METHOD_CALL                                         !0, 'parse'
         32        SEND_VAR_EX                                              !1
         33        SEND_VAR_EX                                              !3
         34        DO_FCALL                                      0  $20     
         35        ASSIGN                                                   !2, $20
   21    36        INIT_FCALL                                               'var_dump'
         37        SEND_VAR                                                 !2
         38        DO_ICALL                                                 
   22    39        INIT_FCALL                                               'var_dump'
         40        SEND_VAR                                                 !3
         41        DO_ICALL                                                 
   23    42        INIT_FCALL                                               'var_dump'
         43        INIT_METHOD_CALL                                         !0, 'getErrorCode'
         44        DO_FCALL                                      0  $24     
         45        SEND_VAR                                                 $24
         46        DO_ICALL                                                 
   24    47        INIT_FCALL                                               'var_dump'
         48        INIT_METHOD_CALL                                         !0, 'getErrorMessage'
         49        DO_FCALL                                      0  $26     
         50        SEND_VAR                                                 $26
         51        DO_ICALL                                                 
   25    52        ROPE_INIT                                     4  ~29     !1
         53        ROPE_ADD                                      1  ~29     ~29, '+-+'
         54        ROPE_ADD                                      2  ~29     ~29, !2
         55        ROPE_END                                      3  ~28     ~29, '%0A'
         56        ECHO                                                     ~28
   27    57        ASSIGN                                                   !1, '1990-03-26'
   28    58        INIT_METHOD_CALL                                         !0, 'parse'
         59        SEND_VAR_EX                                              !1
         60        DO_FCALL                                      0  $32     
         61        ASSIGN                                                   !2, $32
   29    62        ROPE_INIT                                     4  ~35     !1
         63        ROPE_ADD                                      1  ~35     ~35, '+-+'
         64        ROPE_ADD                                      2  ~35     ~35, !2
         65        ROPE_END                                      3  ~34     ~35, '%0A'
         66        ECHO                                                     ~34
         67      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.54 ms | 1400 KiB | 17 Q