3v4l.org

run code in 300+ PHP versions simultaneously
<?php $formatter = new IntlDateFormatter( 'ja_JP@calendar=japanese', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'Europe/Madrid', IntlDateFormatter::TRADITIONAL, 'Gy年M月' ); $ts = $formatter->parse('令和元年8月'); //$ts = $formatter->parse('平成31年8月'); var_dump($ts, date('Y-m', $ts));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UKi3b
function name:  (null)
number of ops:  25
compiled vars:  !0 = $formatter, !1 = $ts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'IntlDateFormatter'
    4     1        SEND_VAL_EX                                              'ja_JP%40calendar%3Djapanese'
    5     2        FETCH_CLASS_CONSTANT                             ~3      'IntlDateFormatter', 'FULL'
          3        SEND_VAL_EX                                              ~3
    6     4        FETCH_CLASS_CONSTANT                             ~4      'IntlDateFormatter', 'FULL'
          5        SEND_VAL_EX                                              ~4
    7     6        SEND_VAL_EX                                              'Europe%2FMadrid'
    8     7        FETCH_CLASS_CONSTANT                             ~5      'IntlDateFormatter', 'TRADITIONAL'
          8        SEND_VAL_EX                                              ~5
    9     9        SEND_VAL_EX                                              'Gy%E5%B9%B4M%E6%9C%88'
    3    10        DO_FCALL                                      0          
         11        ASSIGN                                                   !0, $2
   11    12        INIT_METHOD_CALL                                         !0, 'parse'
         13        SEND_VAL_EX                                              '%E4%BB%A4%E5%92%8C%E5%85%83%E5%B9%B48%E6%9C%88'
         14        DO_FCALL                                      0  $8      
         15        ASSIGN                                                   !1, $8
   15    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        INIT_FCALL                                               'date'
         19        SEND_VAL                                                 'Y-m'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $10     
         22        SEND_VAR                                                 $10
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.11 ms | 1006 KiB | 15 Q