DEV Community

Cover image for Online PHP & SQL sandbox with ChatGPT support
Slava Rozhnev
Slava Rozhnev

Posted on • Edited on

Online PHP & SQL sandbox with ChatGPT support

PHPize.online is a project I have been working on for the last 2 years. PHPize is an online environment in which you can quickly create and query an SQL database using one of most popular options such as MySQL, MariaDB, PostgreSQL, SQLite, Oracle and Microsoft SQL Server and write and execute PHP code that can query the database.

The idea for the project was born when I started to answer Stackoveflow questions and realized the best way to help people and answer is by quickly providing live example of the answer.

There are many other coding sandbox sites, but none of them have the option to query a database in the same environment. Since I wanted to help people with database related questions, I had no option that I could use to provide a live example answer, so I solved that problem by creating PHPize.online. If you can’t find a solution, you can develop it!

PHPize.online is an online free online environment for quickly running, experimenting with and sharing PHP and SQL code.

Image description

The sandbox have two sides. Left side contains SQL code editor, Database selector, “Run SQL code” button and SQL execution result block.

So if you just want to test any SQL, you write it in the code editor, select SQL version and run it by pressing the button. Simple, right?

Then, you can query the database you just created with PHP on the right side. You can also select which PHP version to use.

Image description

If you want to share your code snippet with anyone you can either just copy the current URL or generate a shortened URL by pressing the Share button.

For example, the snippet in the screenshot above:
https://phpize.online/sql/mysql80/5472ef8d926d2800cdc726d506f6d06d/php/php81/f8240fd696dd06b56e7072f73024c00a/
https://phpize.online/s/4U

The site also fully supports mobile, has a togglable light/dark mode and changeable text size.

Top comments (5)

Collapse
 
scorgn profile image
Sarina Corrigan

I just want to say that I keep coming back to this tool because it is so useful! There are a lot of mysql sandboxes and php sandboxes but none that integrate so seemlessly and take care of the connection and everything. I can easily see exactly how mysqli and PDO work with different queries and schemas. Thank you for creating this!

Collapse
 
aarone4 profile image
Aaron Reese

Looks good.

Collapse
 
rozhnev profile image
Slava Rozhnev

Thank you, I will be grateful if you can share it on your social networks

Collapse
 
elwafdy profile image
Ali El-Wafdy

Very useful!

Collapse
 
rozhnev profile image
Slava Rozhnev

Thank you, I will be grateful if you share it on your social networks