3v4l.org

run code in 300+ PHP versions simultaneously
<?php $floatConsume = floatval(230); $floatProduce = floatval(1000); $floatRate = ($floatConsume/$floatProduce) * 100; $intRate = intval($floatRate); var_dump(number_format($floatRate,20),$floatRate,$intRate); $floatConsume = floatval(3100); $floatProduce = floatval(1000); $floatRate = ($floatConsume/$floatProduce) * 100; $intRate = intval($floatRate); var_dump(number_format($floatRate,20),$floatRate,$intRate); $floatConsume = floatval(23); $floatProduce = floatval(10); $floatRate = ($floatConsume/$floatProduce) * floatval(100); $intRate = intval($floatRate); var_dump(number_format($floatRate,20),$floatRate,$intRate);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hTBd9
function name:  (null)
number of ops:  56
compiled vars:  !0 = $floatConsume, !1 = $floatProduce, !2 = $floatRate, !3 = $intRate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   CAST                                          5  ~4      230
          1        ASSIGN                                                   !0, ~4
    3     2        CAST                                          5  ~6      1000
          3        ASSIGN                                                   !1, ~6
    4     4        DIV                                              ~8      !0, !1
          5        MUL                                              ~9      ~8, 100
          6        ASSIGN                                                   !2, ~9
    5     7        CAST                                          4  ~11     !2
          8        ASSIGN                                                   !3, ~11
    6     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'number_format'
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 20
         13        DO_ICALL                                         $13     
         14        SEND_VAR                                                 $13
         15        SEND_VAR                                                 !2
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
    8    18        CAST                                          5  ~15     3100
         19        ASSIGN                                                   !0, ~15
    9    20        CAST                                          5  ~17     1000
         21        ASSIGN                                                   !1, ~17
   10    22        DIV                                              ~19     !0, !1
         23        MUL                                              ~20     ~19, 100
         24        ASSIGN                                                   !2, ~20
   11    25        CAST                                          4  ~22     !2
         26        ASSIGN                                                   !3, ~22
   12    27        INIT_FCALL                                               'var_dump'
         28        INIT_FCALL                                               'number_format'
         29        SEND_VAR                                                 !2
         30        SEND_VAL                                                 20
         31        DO_ICALL                                         $24     
         32        SEND_VAR                                                 $24
         33        SEND_VAR                                                 !2
         34        SEND_VAR                                                 !3
         35        DO_ICALL                                                 
   14    36        CAST                                          5  ~26     23
         37        ASSIGN                                                   !0, ~26
   15    38        CAST                                          5  ~28     10
         39        ASSIGN                                                   !1, ~28
   16    40        DIV                                              ~30     !0, !1
         41        CAST                                          5  ~31     100
         42        MUL                                              ~32     ~30, ~31
         43        ASSIGN                                                   !2, ~32
   17    44        CAST                                          4  ~34     !2
         45        ASSIGN                                                   !3, ~34
   18    46        INIT_FCALL                                               'var_dump'
         47        INIT_FCALL                                               'number_format'
         48        SEND_VAR                                                 !2
         49        SEND_VAL                                                 20
         50        DO_ICALL                                         $36     
         51        SEND_VAR                                                 $36
         52        SEND_VAR                                                 !2
         53        SEND_VAR                                                 !3
         54        DO_ICALL                                                 
         55      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.9 ms | 1016 KiB | 15 Q