3v4l.org

run code in 300+ PHP versions simultaneously
<?php function format_val($value){ if(strrpos($value, ',') !== false) $value = str_replace(',', '.', $value); $value = (float) $value; return $value; } echo format_val('1200.30'); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NSVEm
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'format_val'
          1        SEND_VAL                                                 '1200.30'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
    8     4      > RETURN                                                   1

Function format_val:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/NSVEm
function name:  format_val
number of ops:  17
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'strrpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%2C'
          4        DO_ICALL                                         $1      
          5        TYPE_CHECK                                  1018          $1
          6      > JMPZ                                                     ~2, ->13
          7    >   INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 '%2C'
          9        SEND_VAL                                                 '.'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $3      
         12        ASSIGN                                                   !0, $3
    4    13    >   CAST                                          5  ~5      !0
         14        ASSIGN                                                   !0, ~5
    5    15      > RETURN                                                   !0
    6    16*     > RETURN                                                   null

End of function format_val

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.47 ms | 1398 KiB | 18 Q