3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184 ms | 1395 KiB | 17 Q