Currently, GitLab uses the rouge ruby library to highlight code and redcarpet to parse Markdown. There is a closed issue within the rouge project page to fix it, but it seems that is intended behaviour.
In order to get it working, you have to use the start_inline option provided by pygments:
``` php?start_inline=1
$foo = new Bar;
echo $foo->name();
```