3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locale = 'fr_FR'; $dateString = '2020-08-01'; $date = new DateTimeImmutable($dateString); $dateFormatter = new IntlDateFormatter( $locale, IntlDateFormatter::FULL, NULL ); $numberFormatter = new NumberFormatter($locale, NumberFormatter::ORDINAL); $ordinalDay = $numberFormatter->format($date->format('d')); $dateFormatter->setPattern('LLLL Y'); echo $ordinalDay . ' ' . $dateFormatter->format($date->getTimestamp());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P55so
function name:  (null)
number of ops:  38
compiled vars:  !0 = $locale, !1 = $dateString, !2 = $date, !3 = $dateFormatter, !4 = $numberFormatter, !5 = $ordinalDay
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'fr_FR'
    4     1        ASSIGN                                                   !1, '2020-08-01'
    5     2        NEW                                              $8      'DateTimeImmutable'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $8
    6     6        NEW                                              $11     'IntlDateFormatter'
    7     7        SEND_VAR_EX                                              !0
    8     8        FETCH_CLASS_CONSTANT                             ~12     'IntlDateFormatter', 'FULL'
          9        SEND_VAL_EX                                              ~12
    9    10        SEND_VAL_EX                                              null
         11        DO_FCALL                                      0          
    6    12        ASSIGN                                                   !3, $11
   12    13        NEW                                              $15     'NumberFormatter'
         14        SEND_VAR_EX                                              !0
         15        FETCH_CLASS_CONSTANT                             ~16     'NumberFormatter', 'ORDINAL'
         16        SEND_VAL_EX                                              ~16
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !4, $15
   13    19        INIT_METHOD_CALL                                         !4, 'format'
         20        INIT_METHOD_CALL                                         !2, 'format'
         21        SEND_VAL_EX                                              'd'
         22        DO_FCALL                                      0  $19     
         23        SEND_VAR_NO_REF_EX                                       $19
         24        DO_FCALL                                      0  $20     
         25        ASSIGN                                                   !5, $20
   14    26        INIT_METHOD_CALL                                         !3, 'setPattern'
         27        SEND_VAL_EX                                              'LLLL+Y'
         28        DO_FCALL                                      0          
   16    29        CONCAT                                           ~23     !5, '+'
         30        INIT_METHOD_CALL                                         !3, 'format'
         31        INIT_METHOD_CALL                                         !2, 'getTimestamp'
         32        DO_FCALL                                      0  $24     
         33        SEND_VAR_NO_REF_EX                                       $24
         34        DO_FCALL                                      0  $25     
         35        CONCAT                                           ~26     ~23, $25
         36        ECHO                                                     ~26
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.9 ms | 1395 KiB | 13 Q