3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function get_position($string) { $first_letter = strtolower(substr($string,0,1)); if( strstr("aeiou",$vowels) ) { $string = "an <strong>".ucfirst($string)."</strong>"; } else { $string = "a <strong>".ucfirst($string)."</strong>"; } return $string; } $output1 = get_position("Advertising"); $output2 = get_position("Marketing"); echo $output1."<br>"; echo $output2."<br>";
Output for 5.0.4 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: vowels in /in/o5KEU on line 5 Notice: Undefined variable: vowels in /in/o5KEU on line 5 a <strong>Advertising</strong><br>a <strong>Marketing</strong><br>
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: vowels in /in/o5KEU on line 5 Notice: Undefined variable: vowels in /in/o5KEU on line 5 a <strong>Advertising</strong><br>a <strong>Marketing</strong><br>