Handling of specialchars: backwards compatibility for php 5.3 and writing code in one line