php 5.4 doesn't like pass by reference