3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fmt = new NumberFormatter( 'en-US', NumberFormatter::CURRENCY ); $num = "1.234.567,89 $"; echo "We have ".$fmt->parseCurrency($num, $curr)." in $curr\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EBKFJ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $fmt, !1 = $num, !2 = $curr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'NumberFormatter'
          1        SEND_VAL_EX                                              'en-US'
          2        FETCH_CLASS_CONSTANT                             ~4      'NumberFormatter', 'CURRENCY'
          3        SEND_VAL_EX                                              ~4
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
    4     6        ASSIGN                                                   !1, '1.234.567%2C89+%24'
    5     7        INIT_METHOD_CALL                                         !0, 'parseCurrency'
          8        SEND_VAR_EX                                              !1
          9        SEND_VAR_EX                                              !2
         10        DO_FCALL                                      0  $8      
         11        CONCAT                                           ~9      'We+have+', $8
         12        ROPE_INIT                                     3  ~11     '+in+'
         13        ROPE_ADD                                      1  ~11     ~11, !2
         14        ROPE_END                                      2  ~10     ~11, '%0A'
         15        CONCAT                                           ~13     ~9, ~10
         16        ECHO                                                     ~13
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.7 ms | 1393 KiB | 13 Q