3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo '-- 10000 JPY --'."\n"; $fmt = new NumberFormatter('ja_JP', NumberFormatter::CURRENCY); echo 'ja: '.$fmt->formatCurrency(10000, "JPY")."\n"; $fmt = new NumberFormatter('en_JP', NumberFormatter::CURRENCY); echo 'en: '.$fmt->formatCurrency(10000, "JPY")."\n"; $fmt = new NumberFormatter('sv_JP', NumberFormatter::CURRENCY); echo 'sv: '.$fmt->formatCurrency(10000, "JPY")."\n"; echo '-- 49.99 USD --'."\n"; $fmt = new NumberFormatter('ja_JP', NumberFormatter::CURRENCY); echo 'ja: '.$fmt->formatCurrency(49.99, "USD")."\n"; $fmt = new NumberFormatter('en_JP', NumberFormatter::CURRENCY); echo 'en: '.$fmt->formatCurrency(49.99, "USD")."\n"; $fmt = new NumberFormatter('sv_JP', NumberFormatter::CURRENCY); echo 'sv: '.$fmt->formatCurrency(49.99, "USD")."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mtN3f
function name:  (null)
number of ops:  81
compiled vars:  !0 = $fmt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     '--+10000+JPY+--%0A'
    3     1        NEW                                              $1      'NumberFormatter'
          2        SEND_VAL_EX                                              'ja_JP'
          3        FETCH_CLASS_CONSTANT                             ~2      'NumberFormatter', 'CURRENCY'
          4        SEND_VAL_EX                                              ~2
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $1
    4     7        INIT_METHOD_CALL                                         !0, 'formatCurrency'
          8        SEND_VAL_EX                                              10000
          9        SEND_VAL_EX                                              'JPY'
         10        DO_FCALL                                      0  $5      
         11        CONCAT                                           ~6      'ja%3A+', $5
         12        CONCAT                                           ~7      ~6, '%0A'
         13        ECHO                                                     ~7
    5    14        NEW                                              $8      'NumberFormatter'
         15        SEND_VAL_EX                                              'en_JP'
         16        FETCH_CLASS_CONSTANT                             ~9      'NumberFormatter', 'CURRENCY'
         17        SEND_VAL_EX                                              ~9
         18        DO_FCALL                                      0          
         19        ASSIGN                                                   !0, $8
    6    20        INIT_METHOD_CALL                                         !0, 'formatCurrency'
         21        SEND_VAL_EX                                              10000
         22        SEND_VAL_EX                                              'JPY'
         23        DO_FCALL                                      0  $12     
         24        CONCAT                                           ~13     'en%3A+', $12
         25        CONCAT                                           ~14     ~13, '%0A'
         26        ECHO                                                     ~14
    7    27        NEW                                              $15     'NumberFormatter'
         28        SEND_VAL_EX                                              'sv_JP'
         29        FETCH_CLASS_CONSTANT                             ~16     'NumberFormatter', 'CURRENCY'
         30        SEND_VAL_EX                                              ~16
         31        DO_FCALL                                      0          
         32        ASSIGN                                                   !0, $15
    8    33        INIT_METHOD_CALL                                         !0, 'formatCurrency'
         34        SEND_VAL_EX                                              10000
         35        SEND_VAL_EX                                              'JPY'
         36        DO_FCALL                                      0  $19     
         37        CONCAT                                           ~20     'sv%3A+', $19
         38        CONCAT                                           ~21     ~20, '%0A'
         39        ECHO                                                     ~21
    9    40        ECHO                                                     '--+49.99+USD+--%0A'
   10    41        NEW                                              $22     'NumberFormatter'
         42        SEND_VAL_EX                                              'ja_JP'
         43        FETCH_CLASS_CONSTANT                             ~23     'NumberFormatter', 'CURRENCY'
         44        SEND_VAL_EX                                              ~23
         45        DO_FCALL                                      0          
         46        ASSIGN                                                   !0, $22
   11    47        INIT_METHOD_CALL                                         !0, 'formatCurrency'
         48        SEND_VAL_EX                                              49.99
         49        SEND_VAL_EX                                              'USD'
         50        DO_FCALL                                      0  $26     
         51        CONCAT                                           ~27     'ja%3A+', $26
         52        CONCAT                                           ~28     ~27, '%0A'
         53        ECHO                                                     ~28
   12    54        NEW                                              $29     'NumberFormatter'
         55        SEND_VAL_EX                                              'en_JP'
         56        FETCH_CLASS_CONSTANT                             ~30     'NumberFormatter', 'CURRENCY'
         57        SEND_VAL_EX                                              ~30
         58        DO_FCALL                                      0          
         59        ASSIGN                                                   !0, $29
   13    60        INIT_METHOD_CALL                                         !0, 'formatCurrency'
         61        SEND_VAL_EX                                              49.99
         62        SEND_VAL_EX                                              'USD'
         63        DO_FCALL                                      0  $33     
         64        CONCAT                                           ~34     'en%3A+', $33
         65        CONCAT                                           ~35     ~34, '%0A'
         66        ECHO                                                     ~35
   14    67        NEW                                              $36     'NumberFormatter'
         68        SEND_VAL_EX                                              'sv_JP'
         69        FETCH_CLASS_CONSTANT                             ~37     'NumberFormatter', 'CURRENCY'
         70        SEND_VAL_EX                                              ~37
         71        DO_FCALL                                      0          
         72        ASSIGN                                                   !0, $36
   15    73        INIT_METHOD_CALL                                         !0, 'formatCurrency'
         74        SEND_VAL_EX                                              49.99
         75        SEND_VAL_EX                                              'USD'
         76        DO_FCALL                                      0  $40     
         77        CONCAT                                           ~41     'sv%3A+', $40
         78        CONCAT                                           ~42     ~41, '%0A'
         79        ECHO                                                     ~42
         80      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.76 ms | 1399 KiB | 13 Q