When you first open the website in your web browser, then you will see the online php editor page.
The Online PHP Editor uses PHP version 8.3.
There you will see two sections.
On the left is the textarea to enter the PHP code. And on the right, is the div element to show you the output of your provided PHP code.
The output can be an error or the successful outcome of your php code.
There is a sample php code provided by default.
Just click on the Run button below and see the outcome on the right.
Or, you can enter your own php code and then click on the Run button to see the outcome on the right.
While entering the php code, just make sure that you do not use the disabled functions, file handling functions, or the database connections functions as this is a very basic type of online php editor.
Also, check the length of your php code according to the restrictions.
The User provided PHP code is checked both at frontend via vanilla js script.
And also at backend both using php functions and PHP Parser for Static Code Analysis.
The checking is done mainly for functions that are not allowed or banned in the PHP code.
If found, then an error message will be shown to the user.
The user is free to use the online php editor in a normal manner.
Like using variables, arrays (indexed, associative, or multi-dimensional), array functions, strings, string functions, numbers, math functions, different types of loops, operators, object-oriented programming, etc.
The maximum execution time of user provided php code is just 5 seconds after which the script is terminated forcefully.
And the output (partial or full) is returned to the user browser.
The maximum memory allowed for user provided php code is just 10 MB (megabytes).
The user php code execution that uses more than the allowed memory limit is terminated forcefully and the result (partial or full) is returned to the user's web browser.
The maximum string length of user provided php code is 10000 characters.
The user php code length will be checked both at frontend and backend.
An error message will be shown in the output div element that the function is not allowed.
The user is not allowed to provide PHP code that try to connect to the mysql database.
This functionality is not allowed at this moment.
The user provided php code is checked at frontend for mysql database functions.
And an error message will be shown to the user's web browser.
The user is not allowed to enter the file handling functions in provided php code.
This functionality is not allowed at this moment.
The user provided php code is checked for these file handling functions at frontend.
And if found, then an error message will be shown in the user's web browser.
The user is not allowed to use the form element at the current moment.
As most of its functionality is banned or limited in this php editor.