3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.3 ms | 1386 KiB | 17 Q