3v4l.org

run code in 300+ PHP versions simultaneously
<?php $formatter = new NumberFormatter('en_US', NumberFormatter::CURRENCY); echo $formatter->formatCurrency(1234.56) . PHP_EOL; $formatter = new NumberFormatter('de_DE', NumberFormatter::CURRENCY); echo $formatter->formatCurrency(1234.56, 'USD');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DYAGg
function name:  (null)
number of ops:  23
compiled vars:  !0 = $formatter
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, 'formatCurrency'
          7        SEND_VAL_EX                                              1234.56
          8        DO_FCALL                                      0  $5      
          9        CONCAT                                           ~6      $5, '%0A'
         10        ECHO                                                     ~6
    6    11        NEW                                              $7      'NumberFormatter'
         12        SEND_VAL_EX                                              'de_DE'
         13        FETCH_CLASS_CONSTANT                             ~8      'NumberFormatter', 'CURRENCY'
         14        SEND_VAL_EX                                              ~8
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !0, $7
    7    17        INIT_METHOD_CALL                                         !0, 'formatCurrency'
         18        SEND_VAL_EX                                              1234.56
         19        SEND_VAL_EX                                              'USD'
         20        DO_FCALL                                      0  $11     
         21        ECHO                                                     $11
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.47 ms | 1393 KiB | 13 Q