Last Month in PHP - September 2013

D3e3f4ac37c02289f5dfed115949fc88?s=47 John Kary
September 21, 2013

Last Month in PHP - September 2013

Kansas City PHP User Group
September 21, 2013

D3e3f4ac37c02289f5dfed115949fc88?s=128

John Kary

September 21, 2013
Tweet

Transcript

  1. 1.

    Last Month in PHP September 21, 2013 Kansas City PHP

    User Group Slides: http://johnkary.net/talks John Kary @johnkary
  2. 4.

    3.6.1 Maintenance & Security fixes Upgrade NOW! • Block unsafe

    PHP unserialization that could lead to remote code execution. • Prevent a user with an Author role, using a specially crafted request, from being able to create a post “written by” another user. • Fix insufficient input validation that could result in redirecting or leading a user to another website.
  3. 12.

    namespace John\Say { function hello() { return 'Hello World!'; }

    } Define it namespace { use John\Say; echo Say\hello(); // Hello World! } Use it Using namespaced functions as of PHP <= 5.5
  4. 13.

    namespace John\Say { function hello() { return 'Hello World!'; }

    } Define it namespace { use function John\Say\hello; echo hello(); // Hello World! } Use it Using namespaced functions as of PHP >= 5.6
  5. 15.

    Variadic Functions 5.5 function sum() { return array_sum(func_get_args()); } echo

    sum(2, 4, 6, 8); // 20 5.6 function sum(...$args) { return array_sum($args); } echo sum(2, 4, 6, 8); // 20
  6. 16.

    Variadic Functions - Type Hinting 5.6 function weekends(\DateTime ...$weekends) {

    foreach ($weekends as $date) { echo $date->format('Y-m-d') . ", "; } } $sat1 = new \DateTime('September 21, 2013'); $sun1 = new \DateTime('September 22, 2013'); $sat2 = new \DateTime('September 28, 2013'); $sun2 = new \DateTime('September 29, 2013'); echo weekends($sat1, $sun1, $sat2, $sun2); // 2013-09-21, 2013-09-22, 2013-09-28, 2013-09-29,
  7. 18.
  8. 19.
  9. 20.
  10. 21.
  11. 22.

    ZendCon.com 1-day Workshops 2.5 Days of Sessions • Migrating ZF1

    to ZF2 • Testing Legacy PHP Applications • JS Communication APIs (for mobile) • User Acceptance Testing with Selenium • Intro to using Composer • RESTful APIs with ZF2 • DOs and DONTs of MongoDB • MANY MORE!
  12. 25.
  13. 26.
  14. 28.

    Introduction to PHP workshop by php[architect] $250 9am - 4pm

    March 14, 2014 Minneapolis, MN March 15-16, 2014 midwestphp.org