3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function variations($length, $chars) { $unique_chars = count_chars($chars, 3); if ($length <= 0 || $unique_chars <= 0) return 0; $additional = ($length > 1) ? variations($length - 1, $chars) : 0; return pow($unique_chars, $length) + $additional; } echo number_format(variations(5, 26));
Output for 4.3.0 - 7.1.0
12,356,630