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); echo ($l == $m) . " - " . $l . " - " . $m . "\n"; return ($l > $m) ? $x : ($l < $m) ? $y : "Tie!"; } echo battle("FOUR", "FIVE");
based on clWMK
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
- 60 - 42 FIVE