3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function calculate($base, $iv, $ev, $level) { return floor(((2 * $base + $iv + floor($ev / 4)) * $level) / 100) + $level + 10; } $base = 70; $iv = 31; for ($ev = 0; $ev < 255; $ev += 4) { $hp1 = calculate($base, $iv, $ev, 50); $hp2 = calculate($base, $iv, $ev, 100); if (/*$hp1 % 16 === 0 && */$hp2 % 16 === 0) { echo $ev, " HP EVs - ", $hp2, " HP\r\n"; } }
based on OkuXu
Output for 5.6.0 - 7.3.0rc4
28 HP EVs - 288 HP 92 HP EVs - 304 HP 156 HP EVs - 320 HP 220 HP EVs - 336 HP