3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function wordScore($word){ $map = '^^abcdefghijklmnopqrstuvwxyz1234567890'; return array_reduce(str_split($word), function($score, $letter) use ($map) { if (!$score) $score = 2; return $score | pow(stripos($map, $letter), 2); }); } echo wordScore('whisky); exit;
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected ''whisky);' (T_ENCAPSED_AND_WHITESPACE), expecting ')' in /in/RE7VJ on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ')' in /in/RE7VJ on line 12
Process exited with code 255.