Let your friend double-check that he is working 5.4. Your syntax is great for 5.3 and 5.4 (and I suppose any future version of PHP)
You can test your code in PHP 5.4 here (run echo phpversion(); to really confirm this is 5.4). As you will see, this does not cause any errors.
source share