3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name = '管理者'; $formatter = new MessageFormatter('en_US', 'Hi {name}!'); var_dump($formatter->format(['name' => $name])); var_dump($formatter->getErrorMessage()); $name = mb_convert_encoding($name, 'EUC-JP'); var_dump($formatter->format(['name' => $name])); var_dump($formatter->getErrorMessage());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jOWCt
function name:  (null)
number of ops:  36
compiled vars:  !0 = $name, !1 = $formatter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%E7%AE%A1%E7%90%86%E8%80%85'
    3     1        NEW                                              $3      'MessageFormatter'
          2        SEND_VAL_EX                                              'en_US'
          3        SEND_VAL_EX                                              'Hi+%7Bname%7D%21'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $3
    5     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !1, 'format'
          8        INIT_ARRAY                                       ~6      !0, 'name'
          9        SEND_VAL_EX                                              ~6
         10        DO_FCALL                                      0  $7      
         11        SEND_VAR                                                 $7
         12        DO_ICALL                                                 
    6    13        INIT_FCALL                                               'var_dump'
         14        INIT_METHOD_CALL                                         !1, 'getErrorMessage'
         15        DO_FCALL                                      0  $9      
         16        SEND_VAR                                                 $9
         17        DO_ICALL                                                 
    8    18        INIT_FCALL                                               'mb_convert_encoding'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 'EUC-JP'
         21        DO_ICALL                                         $11     
         22        ASSIGN                                                   !0, $11
    9    23        INIT_FCALL                                               'var_dump'
         24        INIT_METHOD_CALL                                         !1, 'format'
         25        INIT_ARRAY                                       ~13     !0, 'name'
         26        SEND_VAL_EX                                              ~13
         27        DO_FCALL                                      0  $14     
         28        SEND_VAR                                                 $14
         29        DO_ICALL                                                 
   10    30        INIT_FCALL                                               'var_dump'
         31        INIT_METHOD_CALL                                         !1, 'getErrorMessage'
         32        DO_FCALL                                      0  $16     
         33        SEND_VAR                                                 $16
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.83 ms | 1396 KiB | 17 Q