3v4l.org

run code in 300+ PHP versions simultaneously
<?php $paymentAmount = '19.90'; $paymentAmount = (int) ($paymentAmount * '100'); var_dump($paymentAmount); $paymentAmount = '19.90'; $paymentAmount = (int) bcmul($paymentAmount, '100'); var_dump($paymentAmount);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RPblb
function name:  (null)
number of ops:  18
compiled vars:  !0 = $paymentAmount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '19.90'
    3     1        MUL                                              ~2      !0, '100'
          2        CAST                                          4  ~3      ~2
          3        ASSIGN                                                   !0, ~3
    4     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    6     7        ASSIGN                                                   !0, '19.90'
    7     8        INIT_FCALL_BY_NAME                                       'bcmul'
          9        SEND_VAR_EX                                              !0
         10        SEND_VAL_EX                                              '100'
         11        DO_FCALL                                      0  $7      
         12        CAST                                          4  ~8      $7
         13        ASSIGN                                                   !0, ~8
    8    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.17 ms | 1394 KiB | 15 Q