3v4l.org

run code in 500+ PHP versions simultaneously
<?php $amount = 7.5; $vat = 9; $result = $amount * ($vat / 100.0); echo "Result = ".$result."\n"; $rounded = round($result,2); echo "Rounded = ".$rounded."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a9Wol
function name:  (null)
number of ops:  17
compiled vars:  !0 = $amount, !1 = $vat, !2 = $result, !3 = $rounded
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 7.5
    4     1        ASSIGN                                                       !1, 9
    5     2        DIV                                                  ~6      !1, 100
          3        MUL                                                  ~7      !0, ~6
          4        ASSIGN                                                       !2, ~7
    6     5        CONCAT                                               ~9      'Result+%3D+', !2
          6        CONCAT                                               ~10     ~9, '%0A'
          7        ECHO                                                         ~10
    8     8        INIT_FCALL                                                   'round'
          9        SEND_VAR                                                     !2
         10        SEND_VAL                                                     2
         11        DO_ICALL                                             $11     
         12        ASSIGN                                                       !3, $11
    9    13        CONCAT                                               ~13     'Rounded+%3D+', !3
         14        CONCAT                                               ~14     ~13, '%0A'
         15        ECHO                                                         ~14
         16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
129.83 ms | 488 KiB | 10 Q