Chapter in this post:
Ok, the headline sounds a bit strange, because PHP code mostly runs online when you don't have your own MAMP server running. Nevertheless, the title hits the nail on the head, because what I discovered today is a small test window in the browser with which you can quickly try out PHP code and its output without any files (I just say "test.php"! ) to have to write.
But what was decisive for this article is a nice tool that you can use find can. There, for example, code examples for PHP functions can be called up, which can even be changed live.
In the left text window you can see the code and on the right the output. This always changes when you click on the green "Run" button above.
With this I tried out which characters are filtered out of the string by the PHP function FILTER_SANITIZE_STRING. As it turned out, the function is perfect for cleaning data from form fields in order to remove possible malicious code.
I have to say that I really like the w3schools site. You not only get explanations of functions, as is also the case with many other PHP information portals, but you can also try out many things by using the "Try it Yourself" button. Here, for example, the button is placed in the PHP command strpos (). Clicking on it opens the sample code in a text window, which you can use to test the code directly.
In this way you can try out the code examples a bit and also incorporate your own data to see what the programming does with them.
Jens has been running the blog since 2012. He appears as Sir Apfelot for his readers and helps them with problems of a technical nature. In his free time he drives electric unicycles, takes photos (preferably with his iPhone, of course), climbs around in the Hessian mountains or hikes with the family. His articles deal with Apple products, news from the world of drones or solutions for current bugs.