3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(LC_ALL, 'de_DE.UTF-8'); $num = (float)123.456; 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/QaCNu
function name:  (null)
number of ops:  21
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                                                 
    5     4        CAST                                          5  ~3      123.456
          5        ASSIGN                                                   !0, ~3
    7     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    8     9        NEW                                              $6      'NumberFormatter'
         10        SEND_VAL_EX                                              'en_US'
         11        FETCH_CLASS_CONSTANT                             ~7      'NumberFormatter', 'DECIMAL'
         12        SEND_VAL_EX                                              ~7
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !1, $6
    9    15        INIT_METHOD_CALL                                         !1, 'parse'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0  $10     
         18        CONCAT                                           ~11     $10, '%0A'
         19        ECHO                                                     ~11
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.44 ms | 1395 KiB | 17 Q