About OnlinePHP.io

Hello and welcome to OnlinePHP.io!

This website was started in 2001 to be able to run PHP code without having to set up a local environment and compare the output between versions.
For over a decade a simple input was used with a PHP version selector. Early 2022 I released a major update to the website what brought it to its current form. For historical and nostalgic reasons you can find the working old legacy version here: https://legacy-sandbox.onlinephpfunctions.com.

Technical details

Almost all PHP versions since v4.0 have been manually compiled, and are running on virtual servers. Your code is sent to the virtual server, executed and the results are displayed in HTML form or a textbox on this website (depending on your settings). The virtual servers are updated constantly, they can expand depending on how busy the website is and usually have 2 cores and 4GB of ram.
To avoid abuse of this tool, network access is disabled and filesystem access is limited. Max execution time is set to 3 seconds with a hard limit of 5 seconds.


The errors you see are not errors on the website, but the actual errors you get when executing the command exactly with the parameters you entered. This way you can see what is wrong with your code and learn from it. Open the PHP Settings to set the level of error reporting you want.

Are you missing something, found errors or do you have other suggestions?

Post a comment, or send me an email, and I will take a look at it.

Happy PHPing!

I hope you enjoy this website, learn something or have some convenience trying to write code. If you do, please leave a comment or share your links!


If you like this website, consider leaving a donation, it is very much appreciated and helps me pay for the upkeep of the servers 😀

Online tool Categories

Last used PHP functions