3v4l.org

run code in 300+ PHP versions simultaneously
<?php $width = 2500 / 1000; $height = 1500 / 1000; $quantity = (float)(round($width,2)) * (round($height,2)); $price = (float)substr("£10.00", 2); echo (round($quantity,2) * $price);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3MSko
function name:  (null)
number of ops:  26
compiled vars:  !0 = $width, !1 = $height, !2 = $quantity, !3 = $price
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2.5
    4     1        ASSIGN                                                   !1, 1.5
    5     2        INIT_FCALL                                               'round'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 2
          5        DO_ICALL                                         $6      
          6        CAST                                          5  ~7      $6
          7        INIT_FCALL                                               'round'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 2
         10        DO_ICALL                                         $8      
         11        MUL                                              ~9      $8, ~7
         12        ASSIGN                                                   !2, ~9
    6    13        INIT_FCALL                                               'substr'
         14        SEND_VAL                                                 '%C2%A310.00'
         15        SEND_VAL                                                 2
         16        DO_ICALL                                         $11     
         17        CAST                                          5  ~12     $11
         18        ASSIGN                                                   !3, ~12
    7    19        INIT_FCALL                                               'round'
         20        SEND_VAR                                                 !2
         21        SEND_VAL                                                 2
         22        DO_ICALL                                         $14     
         23        MUL                                              ~15     !3, $14
         24        ECHO                                                     ~15
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155 ms | 1395 KiB | 17 Q