3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = 1; $y = 1; $xBonus = $y*0.025; $yBonus = $x*1.4; for($i=1;$i<100;$i++){ $xBonus = $yBonus * 0.025; $yBonus = $xBonus * 1.4; echo 'x-bonus: '. $xBonus . ', y-bonus: '.$yBonus."\n"; }
Output for 5.2.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
x-bonus: 0.035, y-bonus: 0.049 x-bonus: 0.001225, y-bonus: 0.001715 x-bonus: 4.2875E-5, y-bonus: 6.0025E-5 x-bonus: 1.500625E-6, y-bonus: 2.100875E-6 x-bonus: 5.2521875E-8, y-bonus: 7.3530625E-8 x-bonus: 1.838265625E-9, y-bonus: 2.573571875E-9 x-bonus: 6.4339296875E-11, y-bonus: 9.0075015625E-11 x-bonus: 2.251875390625E-12, y-bonus: 3.152625546875E-12 x-bonus: 7.8815638671875E-14, y-bonus: 1.1034189414062E-13 x-bonus: 2.7585473535156E-15, y-bonus: 3.8619662949219E-15 x-bonus: 9.6549157373047E-17, y-bonus: 1.3516882032227E-16 x-bonus: 3.3792205080566E-18, y-bonus: 4.7309087112793E-18 x-bonus: 1.1827271778198E-19, y-bonus: 1.6558180489478E-19 x-bonus: 4.1395451223694E-21, y-bonus: 5.7953631713171E-21 x-bonus: 1.4488407928293E-22, y-bonus: 2.028377109961E-22 x-bonus: 5.0709427749025E-24, y-bonus: 7.0993198848635E-24 x-bonus: 1.7748299712159E-25, y-bonus: 2.4847619597022E-25 x-bonus: 6.2119048992556E-27, y-bonus: 8.6966668589578E-27 x-bonus: 2.1741667147394E-28, y-bonus: 3.0438334006352E-28 x-bonus: 7.6095835015881E-30, y-bonus: 1.0653416902223E-29 x-bonus: 2.6633542255558E-31, y-bonus: 3.7286959157781E-31 x-bonus: 9.3217397894454E-33, y-bonus: 1.3050435705224E-32 x-bonus: 3.2626089263059E-34, y-bonus: 4.5676524968282E-34 x-bonus: 1.1419131242071E-35, y-bonus: 1.5986783738899E-35 x-bonus: 3.9966959347247E-37, y-bonus: 5.5953743086146E-37 x-bonus: 1.3988435771536E-38, y-bonus: 1.9583810080151E-38 x-bonus: 4.8959525200378E-40, y-bonus: 6.8543335280529E-40 x-bonus: 1.7135833820132E-41, y-bonus: 2.3990167348185E-41 x-bonus: 5.9975418370463E-43, y-bonus: 8.3965585718648E-43 x-bonus: 2.0991396429662E-44, y-bonus: 2.9387955001527E-44 x-bonus: 7.3469887503817E-46, y-bonus: 1.0285784250534E-45 x-bonus: 2.5714460626336E-47, y-bonus: 3.600024487687E-47 x-bonus: 9.0000612192175E-49, y-bonus: 1.2600085706905E-48 x-bonus: 3.1500214267261E-50, y-bonus: 4.4100299974166E-50 x-bonus: 1.1025074993541E-51, y-bonus: 1.5435104990958E-51 x-bonus: 3.8587762477395E-53, y-bonus: 5.4022867468353E-53 x-bonus: 1.3505716867088E-54, y-bonus: 1.8908003613924E-54 x-bonus: 4.7270009034809E-56, y-bonus: 6.6178012648733E-56 x-bonus: 1.6544503162183E-57, y-bonus: 2.3162304427056E-57 x-bonus: 5.7905761067641E-59, y-bonus: 8.1068065494698E-59 x-bonus: 2.0267016373674E-60, y-bonus: 2.8373822923144E-60 x-bonus: 7.093455730786E-62, y-bonus: 9.9308380231005E-62 x-bonus: 2.4827095057751E-63, y-bonus: 3.4757933080852E-63 x-bonus: 8.6894832702129E-65, y-bonus: 1.2165276578298E-64 x-bonus: 3.0413191445745E-66, y-bonus: 4.2578468024043E-66 x-bonus: 1.0644617006011E-67, y-bonus: 1.4902463808415E-67 x-bonus: 3.7256159521038E-69, y-bonus: 5.2158623329453E-69 x-bonus: 1.3039655832363E-70, y-bonus: 1.8255518165309E-70 x-bonus: 4.5638795413271E-72, y-bonus: 6.389431357858E-72 x-bonus: 1.5973578394645E-73, y-bonus: 2.2363009752503E-73 x-bonus: 5.5907524381257E-75, y-bonus: 7.827053413376E-75 x-bonus: 1.956763353344E-76, y-bonus: 2.7394686946816E-76 x-bonus: 6.848671736704E-78, y-bonus: 9.5881404313856E-78 x-bonus: 2.3970351078464E-79, y-bonus: 3.355849150985E-79 x-bonus: 8.3896228774624E-81, y-bonus: 1.1745472028447E-80 x-bonus: 2.9363680071119E-82, y-bonus: 4.1109152099566E-82 x-bonus: 1.0277288024891E-83, y-bonus: 1.4388203234848E-83 x-bonus: 3.597050808712E-85, y-bonus: 5.0358711321968E-85 x-bonus: 1.2589677830492E-86, y-bonus: 1.7625548962689E-86 x-bonus: 4.4063872406722E-88, y-bonus: 6.1689421369411E-88 x-bonus: 1.5422355342353E-89, y-bonus: 2.1591297479294E-89 x-bonus: 5.3978243698235E-91, y-bonus: 7.5569541177529E-91 x-bonus: 1.8892385294382E-92, y-bonus: 2.6449339412135E-92 x-bonus: 6.6123348530338E-94, y-bonus: 9.2572687942473E-94 x-bonus: 2.3143171985618E-95, y-bonus: 3.2400440779865E-95 x-bonus: 8.1001101949663E-97, y-bonus: 1.1340154272953E-96 x-bonus: 2.8350385682382E-98, y-bonus: 3.9690539955335E-98 x-bonus: 9.9226349888338E-100, y-bonus: 1.3891688984367E-99 x-bonus: 3.4729222460918E-101, y-bonus: 4.8620911445285E-101 x-bonus: 1.2155227861321E-102, y-bonus: 1.701731900585E-102 x-bonus: 4.2543297514625E-104, y-bonus: 5.9560616520475E-104 x-bonus: 1.4890154130119E-105, y-bonus: 2.0846215782166E-105 x-bonus: 5.2115539455415E-107, y-bonus: 7.2961755237582E-107 x-bonus: 1.8240438809395E-108, y-bonus: 2.5536614333154E-108 x-bonus: 6.3841535832884E-110, y-bonus: 8.9378150166037E-110 x-bonus: 2.2344537541509E-111, y-bonus: 3.1282352558113E-111 x-bonus: 7.8205881395283E-113, y-bonus: 1.094882339534E-112 x-bonus: 2.7372058488349E-114, y-bonus: 3.8320881883689E-114 x-bonus: 9.5802204709221E-116, y-bonus: 1.3412308659291E-115 x-bonus: 3.3530771648227E-117, y-bonus: 4.6943080307518E-117 x-bonus: 1.173577007688E-118, y-bonus: 1.6430078107631E-118 x-bonus: 4.1075195269079E-120, y-bonus: 5.750527337671E-120 x-bonus: 1.4376318344178E-121, y-bonus: 2.0126845681849E-121 x-bonus: 5.0317114204621E-123, y-bonus: 7.044395988647E-123 x-bonus: 1.7610989971617E-124, y-bonus: 2.4655385960264E-124 x-bonus: 6.1638464900661E-126, y-bonus: 8.6293850860926E-126 x-bonus: 2.1573462715231E-127, y-bonus: 3.0202847801324E-127 x-bonus: 7.550711950331E-129, y-bonus: 1.0570996730463E-128 x-bonus: 2.6427491826158E-130, y-bonus: 3.6998488556622E-130 x-bonus: 9.2496221391555E-132, y-bonus: 1.2949470994818E-131 x-bonus: 3.2373677487044E-133, y-bonus: 4.5323148481862E-133 x-bonus: 1.1330787120465E-134, y-bonus: 1.5863101968652E-134 x-bonus: 3.9657754921629E-136, y-bonus: 5.5520856890281E-136 x-bonus: 1.388021422257E-137, y-bonus: 1.9432299911598E-137 x-bonus: 4.8580749778996E-139, y-bonus: 6.8013049690594E-139 x-bonus: 1.7003262422648E-140, y-bonus: 2.3804567391708E-140 x-bonus: 5.951141847927E-142, y-bonus: 8.3315985870977E-142 x-bonus: 2.0828996467744E-143, y-bonus: 2.9160595054842E-143 x-bonus: 7.2901487637105E-145, y-bonus: 1.0206208269195E-144
Output for 4.3.0 - 5.2.1
x-bonus: 0.035, y-bonus: 0.049 x-bonus: 0.001225, y-bonus: 0.001715 x-bonus: 4.2875E-05, y-bonus: 6.0025E-05 x-bonus: 1.500625E-06, y-bonus: 2.100875E-06 x-bonus: 5.2521875E-08, y-bonus: 7.3530625E-08 x-bonus: 1.838265625E-09, y-bonus: 2.573571875E-09 x-bonus: 6.4339296875E-11, y-bonus: 9.0075015625E-11 x-bonus: 2.251875390625E-12, y-bonus: 3.152625546875E-12 x-bonus: 7.8815638671875E-14, y-bonus: 1.1034189414062E-13 x-bonus: 2.7585473535156E-15, y-bonus: 3.8619662949219E-15 x-bonus: 9.6549157373047E-17, y-bonus: 1.3516882032227E-16 x-bonus: 3.3792205080566E-18, y-bonus: 4.7309087112793E-18 x-bonus: 1.1827271778198E-19, y-bonus: 1.6558180489478E-19 x-bonus: 4.1395451223694E-21, y-bonus: 5.7953631713171E-21 x-bonus: 1.4488407928293E-22, y-bonus: 2.028377109961E-22 x-bonus: 5.0709427749025E-24, y-bonus: 7.0993198848635E-24 x-bonus: 1.7748299712159E-25, y-bonus: 2.4847619597022E-25 x-bonus: 6.2119048992556E-27, y-bonus: 8.6966668589578E-27 x-bonus: 2.1741667147394E-28, y-bonus: 3.0438334006352E-28 x-bonus: 7.6095835015881E-30, y-bonus: 1.0653416902223E-29 x-bonus: 2.6633542255558E-31, y-bonus: 3.7286959157781E-31 x-bonus: 9.3217397894454E-33, y-bonus: 1.3050435705224E-32 x-bonus: 3.2626089263059E-34, y-bonus: 4.5676524968282E-34 x-bonus: 1.1419131242071E-35, y-bonus: 1.5986783738899E-35 x-bonus: 3.9966959347247E-37, y-bonus: 5.5953743086146E-37 x-bonus: 1.3988435771536E-38, y-bonus: 1.9583810080151E-38 x-bonus: 4.8959525200378E-40, y-bonus: 6.8543335280529E-40 x-bonus: 1.7135833820132E-41, y-bonus: 2.3990167348185E-41 x-bonus: 5.9975418370463E-43, y-bonus: 8.3965585718648E-43 x-bonus: 2.0991396429662E-44, y-bonus: 2.9387955001527E-44 x-bonus: 7.3469887503817E-46, y-bonus: 1.0285784250534E-45 x-bonus: 2.5714460626336E-47, y-bonus: 3.600024487687E-47 x-bonus: 9.0000612192175E-49, y-bonus: 1.2600085706905E-48 x-bonus: 3.1500214267261E-50, y-bonus: 4.4100299974166E-50 x-bonus: 1.1025074993541E-51, y-bonus: 1.5435104990958E-51 x-bonus: 3.8587762477395E-53, y-bonus: 5.4022867468353E-53 x-bonus: 1.3505716867088E-54, y-bonus: 1.8908003613924E-54 x-bonus: 4.7270009034809E-56, y-bonus: 6.6178012648733E-56 x-bonus: 1.6544503162183E-57, y-bonus: 2.3162304427056E-57 x-bonus: 5.7905761067641E-59, y-bonus: 8.1068065494698E-59 x-bonus: 2.0267016373674E-60, y-bonus: 2.8373822923144E-60 x-bonus: 7.093455730786E-62, y-bonus: 9.9308380231005E-62 x-bonus: 2.4827095057751E-63, y-bonus: 3.4757933080852E-63 x-bonus: 8.6894832702129E-65, y-bonus: 1.2165276578298E-64 x-bonus: 3.0413191445745E-66, y-bonus: 4.2578468024043E-66 x-bonus: 1.0644617006011E-67, y-bonus: 1.4902463808415E-67 x-bonus: 3.7256159521038E-69, y-bonus: 5.2158623329453E-69 x-bonus: 1.3039655832363E-70, y-bonus: 1.8255518165309E-70 x-bonus: 4.5638795413271E-72, y-bonus: 6.389431357858E-72 x-bonus: 1.5973578394645E-73, y-bonus: 2.2363009752503E-73 x-bonus: 5.5907524381257E-75, y-bonus: 7.827053413376E-75 x-bonus: 1.956763353344E-76, y-bonus: 2.7394686946816E-76 x-bonus: 6.848671736704E-78, y-bonus: 9.5881404313856E-78 x-bonus: 2.3970351078464E-79, y-bonus: 3.355849150985E-79 x-bonus: 8.3896228774624E-81, y-bonus: 1.1745472028447E-80 x-bonus: 2.9363680071119E-82, y-bonus: 4.1109152099566E-82 x-bonus: 1.0277288024891E-83, y-bonus: 1.4388203234848E-83 x-bonus: 3.597050808712E-85, y-bonus: 5.0358711321968E-85 x-bonus: 1.2589677830492E-86, y-bonus: 1.7625548962689E-86 x-bonus: 4.4063872406722E-88, y-bonus: 6.1689421369411E-88 x-bonus: 1.5422355342353E-89, y-bonus: 2.1591297479294E-89 x-bonus: 5.3978243698235E-91, y-bonus: 7.5569541177529E-91 x-bonus: 1.8892385294382E-92, y-bonus: 2.6449339412135E-92 x-bonus: 6.6123348530338E-94, y-bonus: 9.2572687942473E-94 x-bonus: 2.3143171985618E-95, y-bonus: 3.2400440779865E-95 x-bonus: 8.1001101949663E-97, y-bonus: 1.1340154272953E-96 x-bonus: 2.8350385682382E-98, y-bonus: 3.9690539955335E-98 x-bonus: 9.9226349888338E-100, y-bonus: 1.3891688984367E-99 x-bonus: 3.4729222460918E-101, y-bonus: 4.8620911445285E-101 x-bonus: 1.2155227861321E-102, y-bonus: 1.701731900585E-102 x-bonus: 4.2543297514625E-104, y-bonus: 5.9560616520475E-104 x-bonus: 1.4890154130119E-105, y-bonus: 2.0846215782166E-105 x-bonus: 5.2115539455415E-107, y-bonus: 7.2961755237582E-107 x-bonus: 1.8240438809395E-108, y-bonus: 2.5536614333154E-108 x-bonus: 6.3841535832884E-110, y-bonus: 8.9378150166037E-110 x-bonus: 2.2344537541509E-111, y-bonus: 3.1282352558113E-111 x-bonus: 7.8205881395283E-113, y-bonus: 1.094882339534E-112 x-bonus: 2.7372058488349E-114, y-bonus: 3.8320881883689E-114 x-bonus: 9.5802204709221E-116, y-bonus: 1.3412308659291E-115 x-bonus: 3.3530771648227E-117, y-bonus: 4.6943080307518E-117 x-bonus: 1.173577007688E-118, y-bonus: 1.6430078107631E-118 x-bonus: 4.1075195269079E-120, y-bonus: 5.750527337671E-120 x-bonus: 1.4376318344178E-121, y-bonus: 2.0126845681849E-121 x-bonus: 5.0317114204621E-123, y-bonus: 7.044395988647E-123 x-bonus: 1.7610989971617E-124, y-bonus: 2.4655385960264E-124 x-bonus: 6.1638464900661E-126, y-bonus: 8.6293850860926E-126 x-bonus: 2.1573462715231E-127, y-bonus: 3.0202847801324E-127 x-bonus: 7.550711950331E-129, y-bonus: 1.0570996730463E-128 x-bonus: 2.6427491826158E-130, y-bonus: 3.6998488556622E-130 x-bonus: 9.2496221391555E-132, y-bonus: 1.2949470994818E-131 x-bonus: 3.2373677487044E-133, y-bonus: 4.5323148481862E-133 x-bonus: 1.1330787120465E-134, y-bonus: 1.5863101968652E-134 x-bonus: 3.9657754921629E-136, y-bonus: 5.5520856890281E-136 x-bonus: 1.388021422257E-137, y-bonus: 1.9432299911598E-137 x-bonus: 4.8580749778996E-139, y-bonus: 6.8013049690594E-139 x-bonus: 1.7003262422648E-140, y-bonus: 2.3804567391708E-140 x-bonus: 5.951141847927E-142, y-bonus: 8.3315985870977E-142 x-bonus: 2.0828996467744E-143, y-bonus: 2.9160595054842E-143 x-bonus: 7.2901487637105E-145, y-bonus: 1.0206208269195E-144