3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userPercentage = 0.1 * 0.1; // 10% $total = 100; $userShare = $userPercentage * $total; // 0.05 * 100 = 10 echo "$userShare\n"; $new_total = $userShare * 10; // 10 being the amount of users. This totals $100. echo "$new_total\n"; $userPercentage = 0.1 * 0.3; // 30% $total = 100; $userShare = $userPercentage * $total; // 0.3 * 100 = 30 echo "$userShare\n"; $new_total = $userShare * 10; // 10 being the amount of users. This totals $300. echo "$new_total\n"; $userPercentage = 0.1 * 0.6; // 60% $total = 100; $userShare = $userPercentage * $total; // 0.6 * 100 = 60 echo "$userShare\n"; $new_total = $userShare * 10; // 10 being the amount of users. This totals $600. echo "$new_total\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p5cVX
function name:  (null)
number of ops:  37
compiled vars:  !0 = $userPercentage, !1 = $total, !2 = $userShare, !3 = $new_total
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0.01
    4     1        ASSIGN                                                   !1, 100
    5     2        MUL                                              ~6      !0, !1
          3        ASSIGN                                                   !2, ~6
    6     4        NOP                                                      
          5        FAST_CONCAT                                      ~8      !2, '%0A'
          6        ECHO                                                     ~8
    7     7        MUL                                              ~9      !2, 10
          8        ASSIGN                                                   !3, ~9
    8     9        NOP                                                      
         10        FAST_CONCAT                                      ~11     !3, '%0A'
         11        ECHO                                                     ~11
   10    12        ASSIGN                                                   !0, 0.03
   11    13        ASSIGN                                                   !1, 100
   12    14        MUL                                              ~14     !0, !1
         15        ASSIGN                                                   !2, ~14
   13    16        NOP                                                      
         17        FAST_CONCAT                                      ~16     !2, '%0A'
         18        ECHO                                                     ~16
   14    19        MUL                                              ~17     !2, 10
         20        ASSIGN                                                   !3, ~17
   15    21        NOP                                                      
         22        FAST_CONCAT                                      ~19     !3, '%0A'
         23        ECHO                                                     ~19
   17    24        ASSIGN                                                   !0, 0.06
   18    25        ASSIGN                                                   !1, 100
   19    26        MUL                                              ~22     !0, !1
         27        ASSIGN                                                   !2, ~22
   20    28        NOP                                                      
         29        FAST_CONCAT                                      ~24     !2, '%0A'
         30        ECHO                                                     ~24
   21    31        MUL                                              ~25     !2, 10
         32        ASSIGN                                                   !3, ~25
   22    33        NOP                                                      
         34        FAST_CONCAT                                      ~27     !3, '%0A'
         35        ECHO                                                     ~27
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.86 ms | 1395 KiB | 13 Q