code does not work on hhvm but with all tested php versions