3v4l.org

run code in 300+ PHP versions simultaneously
<?php // "date_default_timezone_set" may be required by your server //date_default_timezone_set( 'Europe/Dublin' ); date_default_timezone_set( 'Asia/Tokyo' ); $ts = 1682429400; echo 'STREAMER_TYPE_DATE is ' . gmstrftime("%Y%m%dT%H%M%SZ", $ts) . "\n"; //STREAMER_TYPE_DATE $dateFormatGMT = datefmt_create( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'UTC', IntlDateFormatter::GREGORIAN, "yyyyMMdd'T'HHmmSS'Z'" ); echo 'STREAMER_TYPE_DATE is ' . datefmt_format($dateFormatGMT, $ts) . "\n"; echo 'STREAMER_TYPE_DATE_DASHES is ' . gmstrftime("%Y-%m-%dT%H:%M:%S.000Z", $ts) . "\n"; //STREAMER_TYPE_DATE_DASHES $dateFormatGMTdashes = datefmt_create( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'UTC', IntlDateFormatter::GREGORIAN, "yyyy-MM-dd'T'HH:mm:SS'.000Z'" ); echo 'STREAMER_TYPE_DATE_DASHES is ' . datefmt_format($dateFormatGMTdashes, $ts) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eUbA1
function name:  (null)
number of ops:  57
compiled vars:  !0 = $ts, !1 = $dateFormatGMT, !2 = $dateFormatGMTdashes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'Asia%2FTokyo'
          2        DO_ICALL                                                 
    8     3        ASSIGN                                                   !0, 1682429400
   10     4        INIT_FCALL                                               'gmstrftime'
          5        SEND_VAL                                                 '%25Y%25m%25dT%25H%25M%25SZ'
          6        SEND_VAR                                                 !0
          7        DO_FCALL_BY_NAME                                         
          8        CONCAT                                           ~6      'STREAMER_TYPE_DATE+is+', $5
          9        CONCAT                                           ~7      ~6, '%0A'
         10        ECHO                                                     ~7
   13    11        INIT_FCALL_BY_NAME                                       'datefmt_create'
   14    12        SEND_VAL_EX                                              'en_US'
   15    13        FETCH_CLASS_CONSTANT                             ~8      'IntlDateFormatter', 'FULL'
         14        SEND_VAL_EX                                              ~8
   16    15        FETCH_CLASS_CONSTANT                             ~9      'IntlDateFormatter', 'FULL'
         16        SEND_VAL_EX                                              ~9
   17    17        SEND_VAL_EX                                              'UTC'
   18    18        FETCH_CLASS_CONSTANT                             ~10     'IntlDateFormatter', 'GREGORIAN'
         19        SEND_VAL_EX                                              ~10
   19    20        SEND_VAL_EX                                              'yyyyMMdd%27T%27HHmmSS%27Z%27'
   13    21        DO_FCALL                                      0  $11     
         22        ASSIGN                                                   !1, $11
   21    23        INIT_FCALL_BY_NAME                                       'datefmt_format'
         24        SEND_VAR_EX                                              !1
         25        SEND_VAR_EX                                              !0
         26        DO_FCALL                                      0  $13     
         27        CONCAT                                           ~14     'STREAMER_TYPE_DATE+is+', $13
         28        CONCAT                                           ~15     ~14, '%0A'
         29        ECHO                                                     ~15
   23    30        INIT_FCALL                                               'gmstrftime'
         31        SEND_VAL                                                 '%25Y-%25m-%25dT%25H%3A%25M%3A%25S.000Z'
         32        SEND_VAR                                                 !0
         33        DO_FCALL_BY_NAME                                         
         34        CONCAT                                           ~17     'STREAMER_TYPE_DATE_DASHES+is+', $16
         35        CONCAT                                           ~18     ~17, '%0A'
         36        ECHO                                                     ~18
   25    37        INIT_FCALL_BY_NAME                                       'datefmt_create'
   26    38        SEND_VAL_EX                                              'en_US'
   27    39        FETCH_CLASS_CONSTANT                             ~19     'IntlDateFormatter', 'FULL'
         40        SEND_VAL_EX                                              ~19
   28    41        FETCH_CLASS_CONSTANT                             ~20     'IntlDateFormatter', 'FULL'
         42        SEND_VAL_EX                                              ~20
   29    43        SEND_VAL_EX                                              'UTC'
   30    44        FETCH_CLASS_CONSTANT                             ~21     'IntlDateFormatter', 'GREGORIAN'
         45        SEND_VAL_EX                                              ~21
   31    46        SEND_VAL_EX                                              'yyyy-MM-dd%27T%27HH%3Amm%3ASS%27.000Z%27'
   25    47        DO_FCALL                                      0  $22     
         48        ASSIGN                                                   !2, $22
   33    49        INIT_FCALL_BY_NAME                                       'datefmt_format'
         50        SEND_VAR_EX                                              !2
         51        SEND_VAR_EX                                              !0
         52        DO_FCALL                                      0  $24     
         53        CONCAT                                           ~25     'STREAMER_TYPE_DATE_DASHES+is+', $24
         54        CONCAT                                           ~26     ~25, '%0A'
         55        ECHO                                                     ~26
         56      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.58 ms | 1442 KiB | 15 Q