3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = new DateTime(); Locale::setDefault('en_US'); $formatter = new IntlDateFormatter(Locale::getDefault(), IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE); echo $formatter->format($time)."\n"; Locale::setDefault('en_GB'); $formatter = new IntlDateFormatter(Locale::getDefault(), IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE); echo $formatter->format($time)."\n"; Locale::setDefault('no_NO'); $formatter = new IntlDateFormatter(Locale::getDefault(), IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE); echo $formatter->format($time)."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PM4ZN
function name:  (null)
number of ops:  58
compiled vars:  !0 = $time, !1 = $formatter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    5     3        INIT_STATIC_METHOD_CALL                                  'Locale', 'setDefault'
          4        SEND_VAL_EX                                              'en_US'
          5        DO_FCALL                                      0          
    6     6        NEW                                              $6      'IntlDateFormatter'
          7        INIT_STATIC_METHOD_CALL                                  'Locale', 'getDefault'
          8        DO_FCALL                                      0  $7      
          9        SEND_VAR_NO_REF_EX                                       $7
         10        FETCH_CLASS_CONSTANT                             ~8      'IntlDateFormatter', 'MEDIUM'
         11        SEND_VAL_EX                                              ~8
         12        FETCH_CLASS_CONSTANT                             ~9      'IntlDateFormatter', 'NONE'
         13        SEND_VAL_EX                                              ~9
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !1, $6
    7    16        INIT_METHOD_CALL                                         !1, 'format'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0  $12     
         19        CONCAT                                           ~13     $12, '%0A'
         20        ECHO                                                     ~13
    9    21        INIT_STATIC_METHOD_CALL                                  'Locale', 'setDefault'
         22        SEND_VAL_EX                                              'en_GB'
         23        DO_FCALL                                      0          
   10    24        NEW                                              $15     'IntlDateFormatter'
         25        INIT_STATIC_METHOD_CALL                                  'Locale', 'getDefault'
         26        DO_FCALL                                      0  $16     
         27        SEND_VAR_NO_REF_EX                                       $16
         28        FETCH_CLASS_CONSTANT                             ~17     'IntlDateFormatter', 'MEDIUM'
         29        SEND_VAL_EX                                              ~17
         30        FETCH_CLASS_CONSTANT                             ~18     'IntlDateFormatter', 'NONE'
         31        SEND_VAL_EX                                              ~18
         32        DO_FCALL                                      0          
         33        ASSIGN                                                   !1, $15
   11    34        INIT_METHOD_CALL                                         !1, 'format'
         35        SEND_VAR_EX                                              !0
         36        DO_FCALL                                      0  $21     
         37        CONCAT                                           ~22     $21, '%0A'
         38        ECHO                                                     ~22
   13    39        INIT_STATIC_METHOD_CALL                                  'Locale', 'setDefault'
         40        SEND_VAL_EX                                              'no_NO'
         41        DO_FCALL                                      0          
   14    42        NEW                                              $24     'IntlDateFormatter'
         43        INIT_STATIC_METHOD_CALL                                  'Locale', 'getDefault'
         44        DO_FCALL                                      0  $25     
         45        SEND_VAR_NO_REF_EX                                       $25
         46        FETCH_CLASS_CONSTANT                             ~26     'IntlDateFormatter', 'MEDIUM'
         47        SEND_VAL_EX                                              ~26
         48        FETCH_CLASS_CONSTANT                             ~27     'IntlDateFormatter', 'NONE'
         49        SEND_VAL_EX                                              ~27
         50        DO_FCALL                                      0          
         51        ASSIGN                                                   !1, $24
   15    52        INIT_METHOD_CALL                                         !1, 'format'
         53        SEND_VAR_EX                                              !0
         54        DO_FCALL                                      0  $30     
         55        CONCAT                                           ~31     $30, '%0A'
         56        ECHO                                                     ~31
         57      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.07 ms | 1399 KiB | 13 Q