3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.58 ms | 1394 KiB | 13 Q