Getting Started With PHPSandbox.io — An Online Code Sandbox For PHP
Tags: php, codesandbox, phpsandbox, phpcli
Published: 2020-07-01 07:59:23

---
title: Getting Started With PHPSandbox.io — An Online Code Sandbox For PHP
published: true
date: 2020-04-19 16:40:12 UTC
tags: php,codesandbox,phpsandbox,phpcli
canonical_url: https://medium.com/@stephenjudeso/getting-started-with-phpsandbox-io-an-online-code-sandbox-for-php-2b04bb3abfbf
---

### Getting Started With PHPSandbox.io — An Online Code Sandbox For PHP

Last week I sent out a getting started mail to everyone following my [Laravel series](https://bit.ly/laravel-lessons) for beginners. I mentioned [PHPSandbox.io](https://phpsandbox.io/) for those who don’t want to setup a local development environment.

So whats this PHPSandbox all about?

![](https://cdn-images-1.medium.com/max/1024/1*qZsfK1VqfrB5kdjvmVO7Xw.png)

### PHPSandbox

PHPSandbox is basically a play ground for PHP developers. It has lots of handy features. Its a place where you can try out code snippets, PHP [packages](https://packagist.org/). Its the coolest way to share PHP code snippets and you can run it from anywhere its embedded.

> PHPSandbox is an online Code Sandbox made for PHP.

With PHPSandbox you can create a PHP CLI app, PHP web app or Laravel app.

In this article we are going to be focusing on creating a Laravel application with PHPSandbox.

### Let me show you!

![](https://cdn-images-1.medium.com/max/919/1*0p6E-bZEBqPYAXjldrnnPA.png)<figcaption>Embedded code using PHPSandbox</figcaption>

_That’s me trying out Zttp, a handy PHP package by_ [_Adam Wathan_](https://twitter.com/adamwathan)_._

### How To Create A PHP/Laravel Notebook

Every of your code snippets on PHPSandbox is saved as a notebook for you. To get started, go to [PHPSandbox.io](http://stephenjude.me/articles/PHPSandbox.io) and launch your own notebook. Make sure you signup with your GitHub account so your notebook won’t get lost.

![](https://cdn-images-1.medium.com/max/1024/0*L3PFP3-mTfTlF_vA.png)

### Laravel Notebook

PHPSandbox supports Laravel. This feature according to [Bosunski](https://twitter.com/bosunski), is still in development but its very cool. You can now run a full-fledged Laravel application without setting up a local development environment. Hurray!

![](https://cdn-images-1.medium.com/max/1024/0*rW0RiCzOj9Rdh0nZ.png)<figcaption>Laravel in PHPSandbox</figcaption>

Laravel in PHPSandbox

I know you already have lots of questions about requiring PHP/Laravel packages, creating .env files and running artisan commands. I saw it coming :)

### PHP/Laravel Packages

You can require PHP/Laravel packages. Doing this is very simple with PHPSandbox and there is no need for composer install, everything is all worked out for you.

![](https://cdn-images-1.medium.com/max/1024/0*6dR03jSbICqkUWW5.png)

### Laravel DotEnv File

You can edit your .env file variables via PHPSandbox UI.

![](https://cdn-images-1.medium.com/max/710/0*XvNZXAUGCVp3byWa.png)

### PHP Artisan Commands

Running Laravel artisan commands is done via PHPSandbox UI

![](https://cdn-images-1.medium.com/max/1024/0*tqAHooqv8SKz82MG.png)

### Import Laravel Projects From GitHub

I think this is the sweetest part of PHPSandbox. You can import your Laravel project from GitHub and continue working on them on the from here. This is cool :)

![](https://cdn-images-1.medium.com/max/1024/0*GRuxwHHETd7SswM0.png)

> Currently you can only import a Laravel project.

### Conclusion

Lots of features are still in beta and more are still coming to PHPSandbox. If you are following my [Laravel series](http://stephenjude.me/articles/bit.ly/laravel-lessons) and you are having a hard time setting up a local development environment, maybe you should give [PHPSandbox](http://stephenjude.me/articles/phpsandbox.io) a trial.

Special thanks to [Bosunski](https://twitter.com/bosunski)and his team for all the works and effort they have been putting into this project. THANK GUYS!