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!


Asyncio Basics Python 35

# Asyncio basics in pythonPython 3.5 brought with it asyncio. An event loop based paradigm previously available as a library but now it i...… Continue reading

Quick Laravel/Lumen install with Docker!

Published on March 02, 2016

PHP To Python

Published on February 24, 2016