3v4l.org

run code in 300+ PHP versions simultaneously
<?php $year = 2022; $formatter = new IntlDateFormatter( 'zh-CN@calendar=chinese', IntlDateFormatter::SHORT, IntlDateFormatter::NONE, 'Europe/Berlin', IntlDateFormatter::TRADITIONAL ); $timeStamp = $formatter->parse($year.'/01/01'); $dateTime = date_create()->setTimeStamp($timeStamp); echo $dateTime->format('j F Y'); //1 February 2022
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fi1jL
function name:  (null)
number of ops:  28
compiled vars:  !0 = $year, !1 = $formatter, !2 = $timeStamp, !3 = $dateTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 2022
    3     1        NEW                                              $5      'IntlDateFormatter'
    4     2        SEND_VAL_EX                                              'zh-CN%40calendar%3Dchinese'
    5     3        FETCH_CLASS_CONSTANT                             ~6      'IntlDateFormatter', 'SHORT'
          4        SEND_VAL_EX                                              ~6
    6     5        FETCH_CLASS_CONSTANT                             ~7      'IntlDateFormatter', 'NONE'
          6        SEND_VAL_EX                                              ~7
    7     7        SEND_VAL_EX                                              'Europe%2FBerlin'
    8     8        FETCH_CLASS_CONSTANT                             ~8      'IntlDateFormatter', 'TRADITIONAL'
          9        SEND_VAL_EX                                              ~8
    3    10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $5
   10    12        INIT_METHOD_CALL                                         !1, 'parse'
         13        CONCAT                                           ~11     !0, '%2F01%2F01'
         14        SEND_VAL_EX                                              ~11
         15        DO_FCALL                                      0  $12     
         16        ASSIGN                                                   !2, $12
   11    17        INIT_FCALL                                               'date_create'
         18        DO_ICALL                                         $14     
         19        INIT_METHOD_CALL                                         $14, 'setTimeStamp'
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0  $15     
         22        ASSIGN                                                   !3, $15
   12    23        INIT_METHOD_CALL                                         !3, 'format'
         24        SEND_VAL_EX                                              'j+F+Y'
         25        DO_FCALL                                      0  $17     
         26        ECHO                                                     $17
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.5 ms | 1005 KiB | 14 Q