3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function section(string $section): bool { if (empty($section) || !in_array($section, ['news', 'viewpoint'])) { return false; } return true; } var_dump(section('newsvvhfgjh'));
based on riXBB
Output for hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0beta1
bool(false)
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/h4tCm on line 3
Process exited with code 255.