3v4l.org

run code in 500+ PHP versions simultaneously
<?php $locale = "es_MX"; $shortDatePattern = "dd/MM/yy"; $in_date = "4/4/23"; $timezone = "America/Mexico_City"; date_default_timezone_set($timezone); $fmt = new IntlDateFormatter($locale,IntlDateFormatter::SHORT,IntlDateFormatter::NONE); $fmt->setPattern($shortDatePattern); $timestamp = $fmt->parse($in_date); echo gmdate('Y-m-d H:i:s', $timestamp) . "\n"; echo date('Y-m-d H:i:s', $timestamp) . "\n"; echo $timestamp . "\n"; echo date_default_timezone_get() . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5ha27
function name:  (null)
number of ops:  41
compiled vars:  !0 = $locale, !1 = $shortDatePattern, !2 = $in_date, !3 = $timezone, !4 = $fmt, !5 = $timestamp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'es_MX'
    3     1        ASSIGN                                                       !1, 'dd%2FMM%2Fyy'
    4     2        ASSIGN                                                       !2, '4%2F4%2F23'
    5     3        ASSIGN                                                       !3, 'America%2FMexico_City'
    7     4        INIT_FCALL                                                   'date_default_timezone_set'
          5        SEND_VAR                                                     !3
          6        DO_ICALL                                                     
    9     7        NEW                                                  $11     'IntlDateFormatter'
          8        SEND_VAR_EX                                                  !0
          9        FETCH_CLASS_CONSTANT                                 ~12     'IntlDateFormatter', 'SHORT'
         10        SEND_VAL_EX                                                  ~12
         11        FETCH_CLASS_CONSTANT                                 ~13     'IntlDateFormatter', 'NONE'
         12        SEND_VAL_EX                                                  ~13
         13        DO_FCALL                                          0          
         14        ASSIGN                                                       !4, $11
   10    15        INIT_METHOD_CALL                                             !4, 'setPattern'
         16        SEND_VAR_EX                                                  !1
         17        DO_FCALL                                          0          
   11    18        INIT_METHOD_CALL                                             !4, 'parse'
         19        SEND_VAR_EX                                                  !2
         20        DO_FCALL                                          0  $17     
         21        ASSIGN                                                       !5, $17
   12    22        INIT_FCALL                                                   'gmdate'
         23        SEND_VAL                                                     'Y-m-d+H%3Ai%3As'
         24        SEND_VAR                                                     !5
         25        DO_ICALL                                             $19     
         26        CONCAT                                               ~20     $19, '%0A'
         27        ECHO                                                         ~20
   13    28        INIT_FCALL                                                   'date'
         29        SEND_VAL                                                     'Y-m-d+H%3Ai%3As'
         30        SEND_VAR                                                     !5
         31        DO_ICALL                                             $21     
         32        CONCAT                                               ~22     $21, '%0A'
         33        ECHO                                                         ~22
   14    34        CONCAT                                               ~23     !5, '%0A'
         35        ECHO                                                         ~23
   15    36        INIT_FCALL                                                   'date_default_timezone_get'
         37        DO_ICALL                                             $24     
         38        CONCAT                                               ~25     $24, '%0A'
         39        ECHO                                                         ~25
         40      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
129.95 ms | 486 KiB | 11 Q