foreach ( $ assoc_ array as $ key= > $ value) echo " $ key contains $ value\ n\ r" ; switch ( $ key) { case. Any other syntax can trigger a parsing error, since PHP is expecting that before. If the function was written as follows, with a default value, the warning would not appear. Parse error: syntax error, unexpected t_ string, expecting t_ old_ function parse error: syntax error,.