3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.48 ms | 1399 KiB | 13 Q