Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Latest in PHP: January 2019 Edition

Chris Gmyr
January 17, 2019

The Latest in PHP: January 2019 Edition

Markdown file can be found here https://github.com/trianglephp/latest-in-php

Chris Gmyr

January 17, 2019
Tweet

More Decks by Chris Gmyr

Other Decks in Programming

Transcript

  1. The Latest in PHP
    January 2019 Edition

    View Slide

  2. Presented by
    Chris Gmyr
    @cmgmyr

    View Slide

  3. PHP Supported Versions
    4 5.6 & 7.0 are EOL!
    4 7.1 Security Only until Dec 1, 2019
    4 7.2 & 7.3 Active Development
    4 7.4 is underway (~Dec 2019)
    http://php.net/supported-versions.php

    View Slide

  4. PHP Releases
    4 5.6.40 & 7.0.33 Final Security Release
    4 7.1.26
    4 7.2.14
    4 7.3.1 (opcache)
    Links:
    4 http://php.net/ChangeLog-7.php
    4 http://php.net/ChangeLog-5.php

    View Slide

  5. RFCs - Deprecations for PHP 7.3
    4 Undocumented mbstring function aliases
    4 String search functions with integer needle (type juggling
    issue)
    4 fgetss() function and string.strip_tags filter (duplicate of
    strip_tags() + stream)
    4 FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED
    (covered by other consts, or unused)
    https://wiki
    .php.net/rfc/deprecationsphp7_3

    View Slide

  6. What's new in 7.3?
    JSON_THROW_ON_ERROR
    // 7.2
    json_decode("{");
    json_last_error() === JSON_ERROR_NONE // the result is false
    json_last_error_msg() // The result is "Syntax error"

    View Slide

  7. What's new in 7.3?
    JSON_THROW_ON_ERROR
    // 7.3
    use JsonException;
    try {
    $json = json_encode("{", JSON_THROW_ON_ERROR);
    return base64_encode($json);
    } catch (JsonException $e) {
    throw new EncryptException('Could not encrypt the data.', 0, $e);
    }

    View Slide

  8. What's new in 7.3?
    is_countable()
    // 7.2
    if (is_array($people) || $people instanceof Countable) {
    // $people is countable
    }

    View Slide

  9. What's new in 7.3?
    is_countable()
    // 7.3
    if (is_countable($people)) {
    // $people is countable
    }

    View Slide

  10. What's new in 7.3?
    4 http://php.net/manual/en/migration73.new-
    features.php
    4 https://hackernoon.com/new-features-of-php-7-3-
    complete-guide-49d254e43ee1

    View Slide

  11. Lookahead to 7.4
    4 Preloading (files in-memory)
    4 Typed properties (public string $name;)
    4 ext-hash always enabled
    4 Password Hashing Registry
    4 Null Coalescing Assignment Operator
    // current
    $data['date'] = $data['date'] ?? new DateTime();
    // new
    $data['date'] ??= new DateTime();
    https://stitcher.io/blog/new-in-php-74

    View Slide

  12. Latest Versions
    4 Laravel: 5.7.21
    4 Symfony: 4.2.2
    4 Drupal: 8.6.7
    4 PHPStorm: 2018.3.3
    4 VSCode: 1.30.2

    View Slide

  13. PHP Conferences - January
    Day Camp 4 Developers: Beyond Performance
    January 18, Online
    https://phpa.me/daycamp-4-devs

    View Slide

  14. PHP Conferences - February
    SunshinePHP 2019
    February 7–9, Miami, FL
    http://sunshinephp.com
    PHP UK Conference 2019
    February 20–22, London, England
    https://www.phpconference.co.uk

    View Slide

  15. Nomad PHP
    US: Testing Like You've Never Tested Before (Because You
    Haven't)
    presented by Steve Grunwell
    January 17, 2019 at 09:00pm EST
    UK: Advanced WordPress: Plugin Creation
    presented by Peter MacIntyre
    January 17, 2019 at 02:00pm EST
    https://nomadphp.com/

    View Slide

  16. Open Call for Papers
    Dutch PHP
    CFP Deadline: January 28, 2019
    June 6 - 8, Amsterdam
    https://www.phpconference.nl/
    PHPKonf 2019
    CFP Deadline: January 31, 2019
    May 4, 2019, Istanbul, Turkey
    https://cfp.phpkonf.org

    View Slide

  17. Upcoming regional events
    Oct 13-15 - All Things Open - http://allthingsopen.org

    View Slide

  18. Notable News & Articles
    4 Laracon Online 2019 ($12 March 6th)
    4 104: Jonathan Reinink - Pushing More Work to the Database
    4 Faster Code Coverage
    4 Writing better Drupal code with static analysis using
    PHPStan
    4 Tips to Speed up Your Phpunit Tests
    4 Q&A on the Book Refactoring - Second Edition

    View Slide

  19. Next Month @ TrianglePHP
    TDB
    Presented By YOU?!?!
    Thursday, February 21, 6pm @ Atlantic BT
    Need an Idea?
    4 Testing
    4 Security
    4 Performance
    4 Git

    View Slide

  20. Have a Job/Need a Job
    Who's hiring?
    Who's looking?
    What are you looking for?
    Book Swap

    View Slide

  21. Tonight @ TrianglePHP
    Apps Without Ops - Web Development
    in Google Cloud Platform
    Presented By - Chris Deaton
    Thank you to Atlantic BT for hosting and refreshments!

    View Slide