Online PHP Editor
PHP Documentation

Documentation | OnlinePHPEditor.com

Introduction

This is the Official Documentation page of the onlinephpeditor.com or onlinephpeditor.in.
This documentation will guide you on how to use the online php editor of this website.
What are the restrictions that the website put on the usage of online php editor.
What are the functions in PHP that you cannot use in your PHP code?
So, please read the documentation before using the online php editor.

How to Use

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.


Checking/Sanitizing the User PHP Code

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.


General Use

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.


Disabled Functions

Below is the list of functions that the user cannot use in their PHP code:-
  1. ` ` - Backticks or Execution Operators
  2. apache_child_terminate
  3. assert
  4. base64_decode
  5. curl_exec
  6. copy
  7. chmod
  8. chown
  9. chgrp
  10. dl
  11. eval
  12. exec
  13. fopen
  14. fread
  15. fclose
  16. fwrite
  17. fgets
  18. feof
  19. fgetc
  20. file_exists
  21. file_uploads
  22. file_get_contents
  23. file_put_contents
  24. glob
  25. ini_set
  26. ini_alter
  27. leak
  28. link
  29. mkdir
  30. mb_send_mail
  31. move_uploaded_file
  32. mysql_list_dbs
  33. mysqli_connect
  34. new mysqli
  35. new PDO
  36. proc_open
  37. popen
  38. passthru
  39. parse_ini_file
  40. rename
  41. readfile
  42. rmdir
  43. scandir
  44. shell_exec
  45. system
  46. symlink
  47. unlink
  48. virtual

These functions are disabled for security reasons and will be checked both at frontend and also at backend in user provided PHP code.
An error message will be shown in the output div element that the function is not allowed.

Max Execution Time of User PHP Code

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.


Max Memory Allowed

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.


Max Length of User PHP Code

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.


Database Functions are 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.


File Handling Functions

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.


Forms

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.


Open Source Acknowledgements/Credits

Our PHP editor uses several open-source libraries to ensure safe and efficient code analysis.
One of the core libraries we use is: We thank the open-source community for their valuable contributions.