×
Eventil - Find Tech Events
Official mobile app
FREE - In Google Play
View
×
Eventil
Official mobile app
FREE - In App Store
View
Video not available

Send us an email to hello@eventil.com

Rethinking Loops

0 0

You likely learned about loop constructs very early in your programming career and use them every day--so often you don't think twice! The problem is for() and foreach() are so fundamental developers use them for everything! Even worse almost every developer will use them differently to accomplish the same goal. So what would intention-revealing PHP code look like without using for() and foreach()? Let's explore some functional programming concepts and find out!Knowing basic functional programming concepts will improve your PHP code. Your new mindset will favor writing code with better separation of concerns and decreased complexity: clean code. We will explore some poor examples of using loops to process data, then ease into learning functional concepts like map, reduce, filter and collection pipelining. We'll then use our newfound knowledge to refactor a large foreach() loop to use the new techniques. Lastly we'll explore some existing libraries and even experimental PHP RFC features to make our code even more concise. Beware: after this talk you'll never look at for() and foreach() loops the same again!

Midwest PHP 2016

Come join us as Midwest PHP returns for its fourth year in Minneapolis, Minnesota on March 4-5, 2016. This year’s conference brings all of the great things you have come to expect from Midwest PHP.