PhpFiddle

PhpFiddle is a platform that provides Web IDE, APIs, Web Tools, Widgets, PHP Libraries, and all required programming resources and last but not least, the most important thing to execute your code: execution environment for PHP/MySQL and HTML/CSS/JavaScript online coding.

PhpFiddle enables its users to test the php code on it. It also allows them to create, test, and download the simple php applications using its simple interface. The latest version of PhpFiddle is PhpFiddle3.4.4.

Note: Several PHP functions are disabled by the PhpFiddle.

PhpFiddle provides a simple and easy-to-use interface to the users to run the code online. It supports HTTPS, HTTP/2.0, openssl, OAuth 1.0a consumer and provider bindings.

Services provided by PhpFiddle

PhpFiddle offers various services to its users to run and test their code online. Following services are provided by PhpFiddle:

Widgets

  • Run PHP/MySQL and HTML/CSS/JavaScript code online
  • Code search
  • Encoding and decoding

REST APIs

  • REST APIs with JSON HTTP response
  • REST APIs with normal HTTP response
  • PHP Functions

PHP Libraries

  • PHP core and extension libraries
  • Execution Environment libraries

Resources

  • References
  • Tools

PhpFiddle Tools

There are two types of PhpFiddle tools offered by PhpFiddle:

  • PhpFiddle Main
  • PhpFiddle Lite

PhpFiddle Main

PhpFiddle Main is an actual version of PhpFiddle, or you can call it the main server of PhpFiddle. Click on the following link (http://phpfiddle.org/) to access the PhpFiddle on the web.

This will take you to the home page of PhpFiddle code editor, where you can write, test and create the code online.

Visit PhpFiddle (http://phpfiddle.org/)

PhpFiddle

This will provide a simple and easy-to-use interface to the users to run the code online.

PhpFiddle Lite

On the other side, PhpFiddle Lite is a lite version of PhpFiddle or you can call it a sub-server. It can be used or run in various ways: e.g., open the PhpFiddle Lite using an HTML link, embed the PhpFiddle Lite on the page, or you can also bind the PhpFiddle Lite to a JavaScript event.

Click on the following link Visit PhpFiddle Lite (http://phpfiddle.org/lite) and visit the PhpFiddle Lite directly from here on the web.

Visit PhpFiddle Lite (http://phpfiddle.org/lite)

PhpFiddle

We will prefer you to open the PhpFiddle using an HTML link. Following code is used to create an HTML link that will open PhpFiddle Lite in a new pop-up window onClick operation.

Features for logged users in PhpFiddle

PhpFiddle offers the following features to the users who logged in to it -

  • PhpFiddle grants a unique directory for every signed-in user to read, write, and update the files directly from it.
  • It does not require any CAPTCHA for such operations: Save and export code or to contact PhpFiddle.
  • User can find all the code saved by them on 'MyLinks' window.
  • It provides a dedicated MySQL database and the best PHP libraries from open resources.
  • To install the PHP widgets, PhpFiddle provides a code that you need to add between two lines of HTML code.
  • PhpFiddle enables the folders option and allows the signed-in users to create a new folder and save the code inside it. This feature is only for registered users with PhpFiddle.
  • It also allows you to save your code either in public status, private status, github:gist, or in the execution environment with a brief description. The code is updatable at all places.

Limitations of PhpFiddle

  • It is a limitation of PhpFiddle that - Unlike jsfiddle, it does not let you actually sync up with github or your github account, but it allows you to save to github.
  • The execution environment of PhpFiddle was shut down since December 22, 2020. So, no code is running now.

Besides that, there might be some other limitations of PhpFiddle when it comes to usage.

Browser support to PhpFiddle

Following is a list of browsers along with their versions that supports PhpFiddle.

Browerchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser SafariPhpFiddle Android Browser
Version10.0+8.0+29.0+7.0+5.1+4.0+

Technologies used by PhpFiddle

Here, we have a list of main technologies and services that are used by PhpFiddle:

  • PHP5, HTML5, CSS3, JavaScript, jQuery, jQuery UI
  • MySQL, SQLite, Linux (Ubuntu), Apache HTTP server
  • CodeIgniter, Securimage, CodeMirror
  • Github:gist, Twitter, Facebook, Google Analytics

In this chapter below, we have discussed some important terms in brief that are used in PhpFiddle. When working with PhpFiddle, one should know about them.

PHP APIs

PHP APIs are nothing; basically, these are PHP functions that are used in other PHP code. But remember that - these PHP APIs can only be used with PHP code.

PhpFiddle does not add any environment library to the file by default. You need to use the following code 'require_once "fiddle_envlib.php"' to include the environment library in your code.

PHP error and exception handling

You will be happy to know that PhpFiddle can catch all the PHP errors and it also prints the error message when the code errors are catched.

These PHP errors might include the following fatal errors: fatal run-time error (E_ERROR), fatal compile-time error (E_COMPILE_ERROR), and fatal error at the initial startup (E_CODE_ERROR).

PHP-MySQL Access

PhpFiddle enables users to use PHP mysql, mysqli, and pdo_mysql. Other than all these facilities and usages, it allows several MySQL user permissions, such as:

  • Create table, Alter table, and Index table,
  • Create view (You can also create different views for users according to access provided to them)
  • Select operation, Insert the data in table, delete table, Update the table data

Following are the information used to connect and access the MySQL database:

host: "localhost", port: "3306", database: "xfiddlec_max", user: "xfiddle_user", password: "public"

Other than this, also use the below DSN address:

DSN: "mysql:host=localhost;dbname=xfiddle_max;port=3306"

PhpFiddle keeps this information in public_db_info.php file. Also add the following line to your code:

Execution environment libraries

On PhpFiddle's execution environment, these Execution environment libraries are default libraries. Users who signed in PhpFiddle can get the sample usages of libraries from the samples directory.

APIs with JSON HTTP response

These APIs can be used by all ajax requests to access the features of PhpFiddle directly.

Signup with PhpFiddle

Click on the following link Visit PhpFiddle (http://phpfiddle.org/) to access the PhpFiddle on the web. It will open the PhpFiddle interface for you.

At the top right corner, PhpFiddle provides Sign Up and Sign In options to login with PhpFiddle. If you are an existing user of PhpFiddle, sign in and start using it.

PhpFiddle

Click on the Sign Up button if you are a new user and register yourself with PhpFiddle. Enter all required details here and randomly generated captcha and click on the Sign-up button given below.

PhpFiddle

Note: All fields are required here. It means that you must have to enter your name, email, password, confirm password, and captcha in the fields.

When you will be signed up successfully, you will get the message on PhpFiddle window (as shown in the below screenshot).

PhpFiddle

Now, click on the Sign in button and login to the PhpFiddle now using your registered email id and password.

PhpFiddle

First PHP code with PhpFiddle

Go to the Code-Space located on the first tab at the top left corner to write some php code on PhpFiddle. Write a simple PHP code with PhpFiddle click on the Run button.

PhpFiddle

When you run this code, the output will show inside the Window tab present near the Code-Space. But this time, it will show a message that the Execution environment was shut down, no code running.

PhpFiddle

PhpFiddle is unable to run your code because the execution environment of phpfiddle.org has been shut down since 2020-12-22, No PHP code running again.






Latest Courses