Open PHP file online

PHP tester allows to test PHP code Online without install. You can test your code easily and quickly. You can test PHP 8 :)

You can test PHP MySQL with PDO, and also test PHP Sodium (PHP 7.4.8 and PHP 8 Only).

To execute your code, you must copy and paste, drag and drop a PHP file or directly type in the "PHP code" online editor below, and click on "Run" button.

You can to help you to use this php sandbox tool.

User guide

How to execute PHP code:

  • First, Drag and drop your PHP file or copy / paste your PHP text directly into the editor above.
  • Finally, you must click on "Run" button to display the result.
How to share PHP code:
  • Click on the menu button "Save & share".
  • Choice a password to protect your share, so only you can change it.
  • Note the URL to access your share.
How to test PHP MySQL Online using PDO:
  • Click on the menu button "Load example" > "PDO / MySQL".
How to generate public and secret keys Online using sodium:
  • Click on the menu button "Load example" > "Sodium / Generate public and secret keys".

PHP code tester tool allows to test PHP code online directly in your browser. Your code is executed on our server, it is only stored for the time to execute it.

This PHP playground can be useful to make online test to save time (deployment ...). You can also share your code, this can be useful for example when you have a problem and want to share it on a forum.

You can test different version of PHP (5.6.40, 7.4.8 and 8). Doing PHP online allows you not to have lots of versions of PHP on your computer.

You can use the PDO module (MySQL database). If you need to test a particular module or another database, you can specify it in a comment (I will study the request).

File Viewer Plus can open PHP files, and comes with helpful source code viewing options, such as a syntax tree view, word wrapping, line numbers, and code folding. You can also edit and save any changes made to the source code in the PHP file.

Open, edit, and save PHP files with our easy-to-use source code editor. Try File Viewer Plus for free today!


Free 14-day trial. 98.0 MB

Open PHP file online

What is a .PHP file?

PHP files are source code files that contain PHP, a web development scripting language used to add extended functionality to webpages. PHP code is parsed by a PHP engine on a web server, which dynamically generates HTML that is sent to the user's web browser. Some examples of functions provided by PHP code include accessing information from a database and processing online forms.

PHP files are typically only used by web developers who are creating or editing PHP files when developing webpages with extended functionality. However, PHP files may be downloaded from a webpage using a web browser, such as Google Chrome or Internet Explorer.

If you have a PHP file that contains PHP code, you can open it with File Viewer Plus. Our software allows you to view the PHP source code with various code viewing tools. You can also modify the code and save it as a PHP, RTF, or TXT file with File Viewer Plus.

Learn more about PHP files at  →

File Viewer Plus PHP Support

  • View
  • Edit
  • Print
  • Save
  • Convert
  • Batch Convert

Conversion options:
RTF, Plain text

File Viewer Plus does not allow you to view the PHP file as a webpage. It can only view the PHP code.

In some cases, PHP files may not actually contain PHP source code. This typically occurs when a file, such as an MP4 video file or PDF document, is downloaded from a web browser and the ".php" file extension is incorrectly applied. If this occurs, simply change the ".php" file extension to the extension of the file that was actually downloaded.

About File Viewer Plus

File Viewer Plus is a universal file viewer for Windows. Why pay for many software programs and clutter your PC when you only need one? File Viewer Plus supports over 400 file types. No longer do you need to buy extra software or install shady programs to open unknown or unique file types. File Viewer Plus also enables you to edit, save, print, and quickly convert your files.

PHP is a general-purpose server-side scripting language that is widely used for web development. PHP was originally created by Rasmus Lerdorf in 1994. It originally translated as a Personal Home Page, but now it stands for PHP's recursive initialism: Hypertext Preprocessor. PHP powers popular websites like Facebook, Wikipedia, Tumblr and content management systems like WordPress and Joomla. PHP is easy to learn, and that's why it has become so popular. The language syntax originates from C and Perl.

PHP code can be embedded directly into HTML without any frameworks, making it easy to create dynamic websites.

PHP Code Example

       <title>PHP Code Example</title>
       <?php echo "Hello World!"; ?>

PHP can be deployed on most web servers and installed on most desktop workstations running modern operating systems, including Windows, macOS, and Linux.

What are the advantages of PHP?

  • PHP is free and open source
  • PHP has a short learning curve
  • PHP comes out of the box on most hosting servers
  • PHP statements can be embedded directly into HTML
  • PHP is cross-platform; this means you can develop your project on Windows or macOS and deploy your application on Linux
  • PHP is widely used by leading Internet companies and has a large and active community

How to run PHP code online?

With the ReqBin Online PHP code runner, you can run PHP code-snippets directly from your browser. No desktop apps or browser plugins are required. Just type the PHP code and click Execute. Built-in PHP code syntax highlighting will highlight PHP syntax and errors as you enter a PHP code.

How do I send a POST request using PHP? How do I POST JSON using PHP Curl Library? How do I convert JSON to PHP array? How to check if a string contains a substring in PHP? How to post form data in PHP? How do I encode a PHP object to JSON string? How do I split a string in PHP? How to get a substring from a string in PHP? How do I send a GET request using PHP? How do I convert string to lowercase in PHP? How do I compare strings in PHP? How to create a new array using PHP array_map()?

How do I open a PHP file in Chrome?

Step by step instructions:.
Download and install XAMPP – The installation is quite simple and straightforward. ... .
Starting XAMPP – Once installed, you need to open the XAMPP Control Panel. ... .
Create your PHP page. ... .
Place the PHP file on the server. ... .
Find the path to your PHP page in your Chrome browser..

How to open a PHP file?

Go to the location of your PHP file, then click the PHP file to select it. Click Open. It's in the bottom-right corner of the window. This will open the PHP file in Notepad++, allowing you to view the file's code and make any necessary edits.

Can we run PHP project online?

To run PHP for the web, you need to install a Web Server like Apache and you also need a database server like MySQL. There are various web servers for running PHP programs like WAMP & XAMPP. WAMP server is supported in windows and XAMP is supported in both Windows and Linux.

Can I run PHP without xampp?

Why Do You Need XAMPP? To run PHP for the web, you will need to install a web server like Apache and a database like MySQL – and both are supported by XAMPP. XAMPP is a local server that can run smoothly on our personal computer, and is accepted in both Windows and Linux.