PHP CLI Development Intro

Published: 01 January 1970
on channel: Dev Drawer
1,541
27

#cli #php #tutorial #introduction

If you are not familiar with CLI, then this is the perfect introduction for you. In this tutorial, I will go over how to write command-line-driven PHP where you can hit an external API and parse results by simply typing a single command in your terminal. With CLI, you can give other non-developers a way to run your code with flags and variables that will be contained within 1 line in either CMD, Powershell, Terminal, or other command-line interfaces.

This tutorial is not in-depth by any means but should help you get started with exploring CLI and PHP development.

Code we will run in CLI:
php index.php {postID or NULL} {-c or NULL} {true or null|false}

00:00 Intro
00:45 What is CLI?
01:48 Setting Up Our Autoloader
06:45 Creating Our Data Class
13:53 Setting Up Arguments in CLI
16:35 Dumping Our Arguments
20:26 Hitting Our API
26:24 Dumping the API Data

Download tutorial files here: https://github.com/thedevdrawer/cli

⭐ If you would like to buy me a coffee because I created something that helped you, it would be much appreciated! : https://www.buymeacoffee.com/devdrawer

⭐ Join this channel to get access to perks:
   / @devdrawer  

⭐ Become a Patreon to show support and get exclusive access to content:   / devdrawer  

`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
Subscribe: https://bit.ly/2Wbsnj9
`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````

Join us on our blog for video recaps and other tutorials: https://thedevdrawer.com
Become a fan on Twitter:   / thedevdrawer  

View Project on GitHub: https://github.com/thedevdrawer


On this page of the site you can watch the video online PHP CLI Development Intro with a duration of hours minute second in good quality, which was uploaded by the user Dev Drawer 01 January 1970, share the link with friends and acquaintances, this video has already been watched 1,541 times on youtube and it was liked by 27 viewers. Enjoy your viewing!