3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
132.81 ms | 1393 KiB | 13 Q