Starting the CLI adventures.

Reading time ~1 minute

If you have ever started out writing PHP CLI, you may notice it's kinda hard to find information about how to get input to and back from the user.

Here is a simple function which will allow you to ask the user for input and then return the input.

function getInput($msg){
	print "$msg \n";
	$handle = fopen ("php://stdin","r");
	$line = fgets($handle);
	return trim($line);
And don't forget to start your CLI document with the following!


Quick Laravel/Lumen install with Docker!

The default installer that comes with Laravel is great, but unfortunately that means you have to install dependencies of PHP and Laravel/...… Continue reading

PHP To Python

Published on February 24, 2016

Aftertouch in Logic Pro X and 2015 Macbook Pro

Published on February 24, 2016