3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 20.001; $formatter = new NumberFormatter(Locale::getDefault(), NumberFormatter::CURRENCY); $formatter->setSymbol(NumberFormatter::CURRENCY_SYMBOL, ''); echo $formatter->format($value, NumberFormatter::TYPE_DOUBLE);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NZkBl
function name:  (null)
number of ops:  21
compiled vars:  !0 = $value, !1 = $formatter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 20.001
    3     1        NEW                                              $3      'NumberFormatter'
          2        INIT_STATIC_METHOD_CALL                                  'Locale', 'getDefault'
          3        DO_FCALL                                      0  $4      
          4        SEND_VAR_NO_REF_EX                                       $4
          5        FETCH_CLASS_CONSTANT                             ~5      'NumberFormatter', 'CURRENCY'
          6        SEND_VAL_EX                                              ~5
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $3
    4     9        INIT_METHOD_CALL                                         !1, 'setSymbol'
         10        FETCH_CLASS_CONSTANT                             ~8      'NumberFormatter', 'CURRENCY_SYMBOL'
         11        SEND_VAL_EX                                              ~8
         12        SEND_VAL_EX                                              ''
         13        DO_FCALL                                      0          
    5    14        INIT_METHOD_CALL                                         !1, 'format'
         15        SEND_VAR_EX                                              !0
         16        FETCH_CLASS_CONSTANT                             ~10     'NumberFormatter', 'TYPE_DOUBLE'
         17        SEND_VAL_EX                                              ~10
         18        DO_FCALL                                      0  $11     
         19        ECHO                                                     $11
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.69 ms | 1398 KiB | 13 Q