paint-brush
An Online PHP & SQL Sandbox That I Created now use ChatGPT to fix your codeby@rozhnev
537 reads
537 reads

An Online PHP & SQL Sandbox That I Created now use ChatGPT to fix your code

by Slava RozhnevMarch 8th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

PHPize is an online environment in which you can quickly create and query an online database using one of the most popular options. You can 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 is by quickly providing live examples.
featured image - An Online PHP & SQL Sandbox That I Created now use ChatGPT to fix your code
Slava Rozhnev HackerNoon profile picture

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 the 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 examples of the answer.


There are many other online coding platforms, 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!


So, I’m glad to introduce here PHPize.online is an online free online environment for quickly running, experimenting with, and sharing PHP and SQL code.


PHPize.online screenshot

The sandbox has two sides. The left side contains the 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 the 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 a changeable text size.


Today, PHPize got a new update! Now you can use AI assistant to fix errors in your code. I want to show it in the next screenshot.


Code with error and AI solution

In the above screenshot, we can see the piece of code where I make the same error (absent comma between array elements). When you run this code, PHP returns an error message, but you can do one click, and AI will fix the error.


Have a happy coding with PHPize!