PrestoPHP to JS