3v4l.org

run code in 300+ PHP versions simultaneously
<?php $amount = '1,00'; $in_cents = int (str_replace(',', '', $amount) * 100); echo $in_cents;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lutJd
function name:  (null)
number of ops:  13
compiled vars:  !0 = $amount, !1 = $in_cents
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1%2C00'
    4     1        INIT_FCALL_BY_NAME                                       'int'
          2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        MUL                                              ~4      $3, 100
          8        SEND_VAL_EX                                              ~4
          9        DO_FCALL                                      0  $5      
         10        ASSIGN                                                   !1, $5
    5    11        ECHO                                                     !1
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.97 ms | 1394 KiB | 15 Q