3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.23 ms | 1394 KiB | 13 Q