What do Homestead, PHPSpec, Behat, Codeception and Drush have in common? They are all CLI applications written in PHP. In this talk Tim will look at how you can harness PHP in building CLI based applications, using a simple old school text adventure game as his main example.

The talk will cover building command line interfaces, looking at options for threading and managing process as well as building and distributing applications as Phar files.

Building for the command line especially on multiple platforms brings some interesting challenges and potential pain points and so this talk is very much a wish I knew this before I started talk.

Comments

Comments are closed.

Great entertaining talk covering lots of relevant topics for building CLI applications. Since there was quite some time left some of the examples could have been explained into more details (e.g. arguments/options parsing, threading, forking).

James Titcumb at 11:27 on 14 Apr 2018

A little under time, but otherwise a good intro to writing CLI stuff. Nice to bring in PHARs too.

The theory was a good intro into CLI, loved it.

The setup in this room was a little unusual to me but I think standing in the middle would have helped the audience on the right to see you better.

With the time left and the it being in the title it might be a good idea to show a small text adventure game in the CLI?

Otherwise great talk!

Iain Fogg at 21:29 on 14 Apr 2018

I enjoy Tim's style of presenting, but this particular session felt to me like it missed some of what it could have delivered.

Firstly, there was no example application being built, even though the session description says there would be one. As a result, the session felt less practical than I'd expected.

Secondly, as it finished quite early, it would have been nice to see more of something like Symfony Console in action using that time, as Tim said that's a good framework for writing CLI apps. That would have probably left me feeling more equipped to develop better CLI apps myself.

I enjoyed learning about the PHAR files, as I'd not seen how to prepare them before.

Thanks Tim!

Pim Elshoff at 11:01 on 15 Apr 2018

Agreed entirely with Iain. For 4/5 I'd like to see a game developed and for 5/5 you could engage the other side of the audience more. This talk was already more than ok, and has a lot of potential.