3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo '-- 10000 JPY --'."\n"; $fmt = new NumberFormatter('ja', NumberFormatter::CURRENCY); echo 'ja: '.$fmt->formatCurrency(10000, "JPY")."\n"; $fmt = new NumberFormatter('en', NumberFormatter::CURRENCY); echo 'en: '.$fmt->formatCurrency(10000, "JPY")."\n"; echo '-- 49.99 USD --'."\n"; $fmt = new NumberFormatter('ja', NumberFormatter::CURRENCY); echo 'ja: '.$fmt->formatCurrency(49.99, "USD")."\n"; $fmt = new NumberFormatter('en', NumberFormatter::CURRENCY); echo 'en: '.$fmt->formatCurrency(49.99, "USD")."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vfRhl
function name:  (null)
number of ops:  55
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'
          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'
         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        ECHO                                                     '--+49.99+USD+--%0A'
    8    28        NEW                                              $15     'NumberFormatter'
         29        SEND_VAL_EX                                              'ja'
         30        FETCH_CLASS_CONSTANT                             ~16     'NumberFormatter', 'CURRENCY'
         31        SEND_VAL_EX                                              ~16
         32        DO_FCALL                                      0          
         33        ASSIGN                                                   !0, $15
    9    34        INIT_METHOD_CALL                                         !0, 'formatCurrency'
         35        SEND_VAL_EX                                              49.99
         36        SEND_VAL_EX                                              'USD'
         37        DO_FCALL                                      0  $19     
         38        CONCAT                                           ~20     'ja%3A+', $19
         39        CONCAT                                           ~21     ~20, '%0A'
         40        ECHO                                                     ~21
   10    41        NEW                                              $22     'NumberFormatter'
         42        SEND_VAL_EX                                              'en'
         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     'en%3A+', $26
         52        CONCAT                                           ~28     ~27, '%0A'
         53        ECHO                                                     ~28
         54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.62 ms | 1399 KiB | 13 Q