3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $currentCoeff = 4.5; define("CHEAT_START_TIME", 1409529600); // 2014-09-01 00:00:00 define("CHEAT_FINAL_TIME", 1410652800); // 2014-09-14 00:00:00 define("CHEAT_MIN_COUNTER", $currentCoeff); define("CHEAT_MAX_COUNTER", 7); $currentCoeff = (float) (time() - CHEAT_START_TIME - 604800) / ((CHEAT_FINAL_TIME + 604800 - CHEAT_START_TIME) / (CHEAT_MAX_COUNTER * 2 - CHEAT_MIN_COUNTER)) + CHEAT_MIN_COUNTER; echo $currentCoeff ;
based on kuLmD
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1.395369212963