3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function power($s) { return array_sum(array_map(function($e) { return ord($e) - 64; }, str_split($s))); } function battle($x, $y) { $l = power($x); $m = power($y); return ($l > $m) ? $x : (($l == $m) ? "Tie!" : $y); } echo battle("FOUR", "FIVE");
based on 18hqo
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
FOUR