Nexmo ❤️ Elephpants at ZendCon

Published November 08, 2016 by Tim Lytle


As expected, ZendCon was a blast and a great kick off to our fall tour of PHP conferences. It’s always fun to spend time with the PHP community, and show off our new elephant swag!

Talks and Tutorials

I had the opportunity to give both a talk and tutorial this year. While PHP is known for serving web requests, and most PHP code operates in that context, the tutorial covered the less common uses of long running processes and daemons.

It’s a pretty simple concept: loop until the job is done. Or in the case of a daemon, loop until a stop signal is received. Since while(true) is a bit light in terms of content, we explored some example uses cases. Consuming the Twitter streaming API was both a natural place to start and always a fun demo to show.


For long running processes, we took a look at normalizing large sets of data. We used Nexmo’s Number Insight API to take 10,000 rows of phone numbers and country codes and add columns for the internationalized version of the number and the number in a proper localized format.

Looking at Daemons, we put together a simple system that accepts wake up call requests, queues those requests, and a daemon processes the queue and uses Nexmo’s API to make the call.

Even if you weren’t able to make the tutorial, you can take a look at the example code and see the progression.

2FA and PHP

I also had a chance to talk about the various methods of second factor authentication. Useful for protecting login, or really any significant action, second factor authentication can be implemented in a variety of ways. 2fa-screen-small From physical hardware, to mobile apps, to single use codes delivered by SMS or over the phone, each has a different impact on your user and your code.

We also took a look at a simple PHP application, to see how adding second factor authentication changes the code. Take a peek at the repository for a walk through on that process. With all the different options for second (or really multi) factor authentication, it’s important to remember that you don’t have to just pick a single method. Another branch adds Google Authenticator support in addition to the Nexmo powered 2FA.

If you were at either of these sessions, I would love your feedback on

Next Stop

ZendCon was just the first stop on our fall PHP tour. Last week we hit Scotland PHP, and next week we’ll be at php[world]. And yes, we’ll have more Nexmo ❤️ Elephants shirts. If you’re there, make sure to stop by and say ‘Hi’.

Leave a Reply

Your email address will not be published.

Get the latest posts from Nexmo’s next-generation communications blog delivered to your inbox.

By signing up to our communications blog, you accept our privacy policy , which sets out how we use your data and the rights you have in respect of your data. You can opt out of receiving our updates by clicking the unsubscribe link in the email or by emailing us at