3v4l.org

run code in 300+ PHP versions simultaneously
<<?php $date = new DateTime(); $dateFormatter = IntlDateFormatter::create( Locale::getDefault(), IntlDateFormatter::NONE, IntlDateFormatter::NONE, date_default_timezone_get(), IntlDateFormatter::GREGORIAN, 'MM-d-yyyy' ); var_dump($dateFormatter->format($date)); // string(6) "Monday"
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/thAaZ
function name:  (null)
number of ops:  27
compiled vars:  !0 = $date, !1 = $dateFormatter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C'
    2     1        NEW                                              $2      'DateTime'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    4     4        INIT_STATIC_METHOD_CALL                                  'IntlDateFormatter', 'create'
    5     5        INIT_STATIC_METHOD_CALL                                  'Locale', 'getDefault'
          6        DO_FCALL                                      0  $5      
          7        SEND_VAR_NO_REF_EX                                       $5
    6     8        FETCH_CLASS_CONSTANT                             ~6      'IntlDateFormatter', 'NONE'
          9        SEND_VAL_EX                                              ~6
    7    10        FETCH_CLASS_CONSTANT                             ~7      'IntlDateFormatter', 'NONE'
         11        SEND_VAL_EX                                              ~7
    8    12        INIT_FCALL                                               'date_default_timezone_get'
         13        DO_ICALL                                         $8      
         14        SEND_VAR_NO_REF_EX                                       $8
    9    15        FETCH_CLASS_CONSTANT                             ~9      'IntlDateFormatter', 'GREGORIAN'
         16        SEND_VAL_EX                                              ~9
   10    17        SEND_VAL_EX                                              'MM-d-yyyy'
         18        DO_FCALL                                      0  $10     
    4    19        ASSIGN                                                   !1, $10
   13    20        INIT_FCALL                                               'var_dump'
         21        INIT_METHOD_CALL                                         !1, 'format'
         22        SEND_VAR_EX                                              !0
         23        DO_FCALL                                      0  $12     
         24        SEND_VAR                                                 $12
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.23 ms | 1399 KiB | 18 Q