Skip to content

Instantly share code, notes, and snippets.

@KalleZ
Created June 8, 2018 23:33
Show Gist options
  • Select an option

  • Save KalleZ/b048336d97d438f1df710bd0ec5a6a98 to your computer and use it in GitHub Desktop.

Select an option

Save KalleZ/b048336d97d438f1df710bd0ec5a6a98 to your computer and use it in GitHub Desktop.
C:\Users\Bruger>php -r "function get_milestones(int $m, int $s = 0){ $x = $m / 100; $t = []; for($y = 1; $y < 101; ++$y){ if($s && $y < $s){ continue; } $t[$y] = ($x * $y); } return($t); } foreach(get_milestones(37214, 70) as $p => $t){ printf('%d%% - %d%s', $p, $t, PHP_EOL); }"
70% - 26049
71% - 26421
72% - 26794
73% - 27166
74% - 27538
75% - 27910
76% - 28282
77% - 28654
78% - 29026
79% - 29399
80% - 29771
81% - 30143
82% - 30515
83% - 30887
84% - 31259
85% - 31631
86% - 32004
87% - 32376
88% - 32748
89% - 33120
90% - 33492
91% - 33864
92% - 34236
93% - 34609
94% - 34981
95% - 35353
96% - 35725
97% - 36097
98% - 36469
99% - 36841
100% - 37214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment