3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(LC_ALL, 'de_DE'); $number = 462.501; print 'Original number: '.$number."\n\n"; $formatter = new NumberFormatter('nl_BE', NumberFormatter::CURRENCY); $value = $formatter->format($number); print 'NumberFormatter::parseCurency() returns: '.$formatter->parseCurrency($value, $currency)."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bNon1
function name:  (null)
number of ops:  26
compiled vars:  !0 = $number, !1 = $formatter, !2 = $value, !3 = $currency
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'setlocale'
          1        SEND_VAL                                                 6
          2        SEND_VAL                                                 'de_DE'
          3        DO_ICALL                                                 
    5     4        ASSIGN                                                   !0, 462.501
    6     5        CONCAT                                           ~6      'Original+number%3A+', !0
          6        CONCAT                                           ~7      ~6, '%0A%0A'
          7        ECHO                                                     ~7
    8     8        NEW                                              $8      'NumberFormatter'
          9        SEND_VAL_EX                                              'nl_BE'
         10        FETCH_CLASS_CONSTANT                             ~9      'NumberFormatter', 'CURRENCY'
         11        SEND_VAL_EX                                              ~9
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !1, $8
    9    14        INIT_METHOD_CALL                                         !1, 'format'
         15        SEND_VAR_EX                                              !0
         16        DO_FCALL                                      0  $12     
         17        ASSIGN                                                   !2, $12
   11    18        INIT_METHOD_CALL                                         !1, 'parseCurrency'
         19        SEND_VAR_EX                                              !2
         20        SEND_VAR_EX                                              !3
         21        DO_FCALL                                      0  $14     
         22        CONCAT                                           ~15     'NumberFormatter%3A%3AparseCurency%28%29+returns%3A+', $14
         23        CONCAT                                           ~16     ~15, '%0A'
         24        ECHO                                                     ~16
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.57 ms | 997 KiB | 14 Q