3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string_number = '1.512.523,55'; // NOTE: You don't really have to use floatval() here, it's just to prove that it's a legitimate float value. $number = floatval(str_replace(',', '.', str_replace('.', '', $string_number)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uLktd
function name:  (null)
number of ops:  14
compiled vars:  !0 = $string_number, !1 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1.512.523%2C55'
    5     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAL                                                 '.'
          4        INIT_FCALL                                               'str_replace'
          5        SEND_VAL                                                 '.'
          6        SEND_VAL                                                 ''
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                         $4      
         11        CAST                                          5  ~5      $4
         12        ASSIGN                                                   !1, ~5
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.33 ms | 1394 KiB | 15 Q