3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parse_float($string) { $float = str_replace( array('.', ','), array('', '.'), $string ); return floatval($float); } echo parse_float('1.000,12');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/baITT
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'parse_float'
          1        SEND_VAL                                                 '1.000%2C12'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function parse_float:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/baITT
function name:  parse_float
number of ops:  10
compiled vars:  !0 = $string, !1 = $float
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'str_replace'
    5     2        SEND_VAL                                                 <array>
    6     3        SEND_VAL                                                 <array>
    7     4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
    4     6        ASSIGN                                                   !1, $2
   10     7        CAST                                          5  ~4      !1
          8      > RETURN                                                   ~4
   11     9*     > RETURN                                                   null

End of function parse_float

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
195.14 ms | 1396 KiB | 16 Q