3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = new \NumberFormatter('lt_LT', NumberFormatter::CURRENCY); echo $f->formatCurrency('2.25', $f->getTextAttribute(\NumberFormatter::CURRENCY_CODE)) . PHP_EOL; $f = new \NumberFormatter('lv_LV', NumberFormatter::CURRENCY); echo $f->formatCurrency('2.25', $f->getTextAttribute(\NumberFormatter::CURRENCY_CODE)) . PHP_EOL; $f = new \NumberFormatter('ie_IE', NumberFormatter::CURRENCY); echo $f->formatCurrency('2.25', $f->getTextAttribute(\NumberFormatter::CURRENCY_CODE)) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Oo2Qv
function name:  (null)
number of ops:  49
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'NumberFormatter'
          1        SEND_VAL_EX                                              'lt_LT'
          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                                              '2.25'
          8        INIT_METHOD_CALL                                         !0, 'getTextAttribute'
          9        FETCH_CLASS_CONSTANT                             ~5      'NumberFormatter', 'CURRENCY_CODE'
         10        SEND_VAL_EX                                              ~5
         11        DO_FCALL                                      0  $6      
         12        SEND_VAR_NO_REF_EX                                       $6
         13        DO_FCALL                                      0  $7      
         14        CONCAT                                           ~8      $7, '%0A'
         15        ECHO                                                     ~8
    6    16        NEW                                              $9      'NumberFormatter'
         17        SEND_VAL_EX                                              'lv_LV'
         18        FETCH_CLASS_CONSTANT                             ~10     'NumberFormatter', 'CURRENCY'
         19        SEND_VAL_EX                                              ~10
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !0, $9
    7    22        INIT_METHOD_CALL                                         !0, 'formatCurrency'
         23        SEND_VAL_EX                                              '2.25'
         24        INIT_METHOD_CALL                                         !0, 'getTextAttribute'
         25        FETCH_CLASS_CONSTANT                             ~13     'NumberFormatter', 'CURRENCY_CODE'
         26        SEND_VAL_EX                                              ~13
         27        DO_FCALL                                      0  $14     
         28        SEND_VAR_NO_REF_EX                                       $14
         29        DO_FCALL                                      0  $15     
         30        CONCAT                                           ~16     $15, '%0A'
         31        ECHO                                                     ~16
    9    32        NEW                                              $17     'NumberFormatter'
         33        SEND_VAL_EX                                              'ie_IE'
         34        FETCH_CLASS_CONSTANT                             ~18     'NumberFormatter', 'CURRENCY'
         35        SEND_VAL_EX                                              ~18
         36        DO_FCALL                                      0          
         37        ASSIGN                                                   !0, $17
   10    38        INIT_METHOD_CALL                                         !0, 'formatCurrency'
         39        SEND_VAL_EX                                              '2.25'
         40        INIT_METHOD_CALL                                         !0, 'getTextAttribute'
         41        FETCH_CLASS_CONSTANT                             ~21     'NumberFormatter', 'CURRENCY_CODE'
         42        SEND_VAL_EX                                              ~21
         43        DO_FCALL                                      0  $22     
         44        SEND_VAR_NO_REF_EX                                       $22
         45        DO_FCALL                                      0  $23     
         46        CONCAT                                           ~24     $23, '%0A'
         47        ECHO                                                     ~24
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.55 ms | 1403 KiB | 13 Q