3v4l.org

run code in 500+ PHP versions simultaneously
<?php use BcMath\Number; $a = new Number('1.005691112'); $b = new Number('2.567891112'); $result = $a * $b; echo $result->round(2); echo PHP_EOL; echo $result; echo PHP_EOL; echo 1.005691112 * 2.567891112; echo PHP_EOL; echo 'precision is '.ini_get('precision');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jCCU2
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $b, !2 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   NEW                                                  $3      'BcMath%5CNumber'
          1        SEND_VAL_EX                                                  '1.005691112'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $3
    6     4        NEW                                                  $6      'BcMath%5CNumber'
          5        SEND_VAL_EX                                                  '2.567891112'
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $6
    8     8        MUL                                                  ~9      !0, !1
          9        ASSIGN                                                       !2, ~9
   10    10        INIT_METHOD_CALL                                             !2, 'round'
         11        SEND_VAL_EX                                                  2
         12        DO_FCALL                                          0  $11     
         13        ECHO                                                         $11
   11    14        ECHO                                                         '%0A'
   12    15        ECHO                                                         !2
   13    16        ECHO                                                         '%0A'
   14    17        ECHO                                                         2.58251
   15    18        ECHO                                                         '%0A'
   16    19        INIT_FCALL                                                   'ini_get'
         20        SEND_VAL                                                     'precision'
         21        DO_ICALL                                             $12     
         22        CONCAT                                               ~13     'precision+is+', $12
         23        ECHO                                                         ~13
         24      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.75 ms | 1375 KiB | 14 Q