I think they're asking for the command to clear the screen when your using php from the command line. Like clr in DOS or clear in Linux. Is it possible wiht PHP from the command line?
I had the same problems. After some hours of searching in the internet, I was sure that there are no good answers, I made some experiments. Luckily experiment 3 worked.
This works on all Windows Computers. I guess that it will work on Linux and other systems too, as long as the PHP Console is a HTML Console (any Web Browser) and Javascript is on this Browser activated.
I started this file on my localhost and uploaded the PHP file to my server and started it from there. Both tests did the CLS. I tried it on Windows XP and a friend did a test on Windows 7, and it worked on his Windows 7 too.
It executes on the client's computer in the PHP file an javascript code.
That isn't the same thing as what the op was asking 10 years ago Franky. The op was asking how to clear the screen when using php in command line form. PHP is commonly known as a server side language so most people would understand that you can't use it to clear a browser.
The code you've posted is simply javascript. The fact that you're echoing it out via php doesn't mean that its actually php clearing the browser screen.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.