3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function get_position($atts) { $string = $_SESSION['position']; $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; } get_position("Advertising");
Output for 5.0.4 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: _SESSION in /in/fOvQC on line 4
Output for hhvm-3.12.0
Notice: Undefined index: position in /in/fOvQC on line -1
Output for hhvm-3.10.0
Notice: Undefined index: position in /in/fOvQC on line 4
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: _SESSION in /in/fOvQC on line 4