Utils for parsing in PHP