3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function get_position($atts) { $string = $atts; $vowels = array("a,e,i,o,u"); $first_letter = strtolower(substr($string,0,1)); if( in_array($first_letter,$vowels) ) { $string = "an <strong>".ucfirst($string)."</strong>"; } else { $string = "a <strong>".ucfirst($string)."</strong>"; } return $string; } $output = get_position("Advertising"); echo $output;
Output for 4.3.0 - 5.6.21, hhvm-3.12.0, 7.0.0 - 7.1.0
a <strong>Advertising</strong>
Output for hhvm-3.10.0

Process exited with code 153.