JavaScript as PHP