3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locale = "sv"; $currency = "USD"; $formatter = new \NumberFormatter($locale, \NumberFormatter::CURRENCY); $priceInCents = 1100; echo $formatter->formatCurrency($priceInCents / 100, $currency);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wc5nN
function name:  (null)
number of ops:  16
compiled vars:  !0 = $locale, !1 = $currency, !2 = $formatter, !3 = $priceInCents
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'sv'
    4     1        ASSIGN                                                   !1, 'USD'
    5     2        NEW                                              $6      'NumberFormatter'
          3        SEND_VAR_EX                                              !0
          4        FETCH_CLASS_CONSTANT                             ~7      'NumberFormatter', 'CURRENCY'
          5        SEND_VAL_EX                                              ~7
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $6
    7     8        ASSIGN                                                   !3, 1100
    8     9        INIT_METHOD_CALL                                         !2, 'formatCurrency'
         10        DIV                                              ~11     !3, 100
         11        SEND_VAL_EX                                              ~11
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0  $12     
         14        ECHO                                                     $12
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.86 ms | 1393 KiB | 13 Q