3v4l.org

run code in 500+ PHP versions simultaneously
<?php $formatter = new \MessageFormatter('en_US', '{0,date,YYYY-ww}'); var_dump($formatter->format([new \DateTimeImmutable])); $formatter = new \MessageFormatter('en_US', '{0}'); var_dump($formatter->format(['test']));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OlhBU
function name:  (null)
number of ops:  26
compiled vars:  !0 = $formatter
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $1      'MessageFormatter'
          1        SEND_VAL_EX                                                  'en_US'
          2        SEND_VAL_EX                                                  '%7B0%2Cdate%2CYYYY-ww%7D'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $1
    4     5        INIT_FCALL                                                   'var_dump'
          6        INIT_METHOD_CALL                                             !0, 'format'
          7        NEW                                                  $4      'DateTimeImmutable'
          8        DO_FCALL                                          0          
          9        INIT_ARRAY                                           ~6      $4
         10        SEND_VAL_EX                                                  ~6
         11        DO_FCALL                                          0  $7      
         12        SEND_VAR                                                     $7
         13        DO_ICALL                                                     
    6    14        NEW                                                  $9      'MessageFormatter'
         15        SEND_VAL_EX                                                  'en_US'
         16        SEND_VAL_EX                                                  '%7B0%7D'
         17        DO_FCALL                                          0          
         18        ASSIGN                                                       !0, $9
    7    19        INIT_FCALL                                                   'var_dump'
         20        INIT_METHOD_CALL                                             !0, 'format'
         21        SEND_VAL_EX                                                  <array>
         22        DO_FCALL                                          0  $12     
         23        SEND_VAR                                                     $12
         24        DO_ICALL                                                     
         25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.11 ms | 477 KiB | 8 Q