3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new \NumberFormatter('en_US', \NumberFormatter::CURRENCY); $a->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, 8); $a->setSymbol(NumberFormatter::CURRENCY_SYMBOL, ''); // It's empty because I want it "minimal" for a table. var_dump($a->formatCurrency(0.0043, 'BTC'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6Bj0B
function name:  (null)
number of ops:  24
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'NumberFormatter'
          1        SEND_VAL_EX                                              'en_US'
          2        FETCH_CLASS_CONSTANT                             ~2      'NumberFormatter', 'CURRENCY'
          3        SEND_VAL_EX                                              ~2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
    4     6        INIT_METHOD_CALL                                         !0, 'setAttribute'
          7        FETCH_CLASS_CONSTANT                             ~5      'NumberFormatter', 'MAX_FRACTION_DIGITS'
          8        SEND_VAL_EX                                              ~5
          9        SEND_VAL_EX                                              8
         10        DO_FCALL                                      0          
    5    11        INIT_METHOD_CALL                                         !0, 'setSymbol'
         12        FETCH_CLASS_CONSTANT                             ~7      'NumberFormatter', 'CURRENCY_SYMBOL'
         13        SEND_VAL_EX                                              ~7
         14        SEND_VAL_EX                                              ''
         15        DO_FCALL                                      0          
    6    16        INIT_FCALL                                               'var_dump'
         17        INIT_METHOD_CALL                                         !0, 'formatCurrency'
         18        SEND_VAL_EX                                              0.0043
         19        SEND_VAL_EX                                              'BTC'
         20        DO_FCALL                                      0  $9      
         21        SEND_VAR                                                 $9
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.61 ms | 1395 KiB | 15 Q