3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locale = 'fr_CH'; $formatter = NumberFormatter::create($locale, NumberFormatter::CURRENCY); echo $formatter->formatCurrency(1000, 'CHF') . PHP_EOL; $locale = 'de_CH'; $formatter = NumberFormatter::create($locale, NumberFormatter::CURRENCY); echo $formatter->formatCurrency(1000, 'CHF');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hSKMf
function name:  (null)
number of ops:  26
compiled vars:  !0 = $locale, !1 = $formatter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'fr_CH'
    5     1        INIT_STATIC_METHOD_CALL                                  'NumberFormatter', 'create'
          2        SEND_VAR_EX                                              !0
          3        FETCH_CLASS_CONSTANT                             ~3      'NumberFormatter', 'CURRENCY'
          4        SEND_VAL_EX                                              ~3
          5        DO_FCALL                                      0  $4      
          6        ASSIGN                                                   !1, $4
    7     7        INIT_METHOD_CALL                                         !1, 'formatCurrency'
          8        SEND_VAL_EX                                              1000
          9        SEND_VAL_EX                                              'CHF'
         10        DO_FCALL                                      0  $6      
         11        CONCAT                                           ~7      $6, '%0A'
         12        ECHO                                                     ~7
    9    13        ASSIGN                                                   !0, 'de_CH'
   11    14        INIT_STATIC_METHOD_CALL                                  'NumberFormatter', 'create'
         15        SEND_VAR_EX                                              !0
         16        FETCH_CLASS_CONSTANT                             ~9      'NumberFormatter', 'CURRENCY'
         17        SEND_VAL_EX                                              ~9
         18        DO_FCALL                                      0  $10     
         19        ASSIGN                                                   !1, $10
   13    20        INIT_METHOD_CALL                                         !1, 'formatCurrency'
         21        SEND_VAL_EX                                              1000
         22        SEND_VAL_EX                                              'CHF'
         23        DO_FCALL                                      0  $12     
         24        ECHO                                                     $12
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.69 ms | 1394 KiB | 13 Q