Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
238 lines (160 sloc) 4.24 KB

autoscale: true theme: Sketchnote, 2

[fit] The Latest in PHP

[fit] January 2019 Edition


Presented by

Chris Gmyr

@cmgmyr


PHP Supported Versions

  • 5.6 & 7.0 are EOL!
  • 7.1 Security Only until Dec 1, 2019
  • 7.2 & 7.3 Active Development
  • 7.4 is underway (~Dec 2019)

http://php.net/supported-versions.php


PHP Releases

  • 5.6.40 & 7.0.33 Final Security Release
  • 7.1.26
  • 7.2.14
  • 7.3.1 (opcache)

Links:


RFCs - Deprecations for PHP 7.3

  • Undocumented mbstring function aliases
  • String search functions with integer needle (type juggling issue)
  • fgetss() function and string.strip_tags filter (duplicate of strip_tags() + stream)
  • FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED (covered by other consts, or unused)

https://wiki.php.net/rfc/deprecations_php_7_3


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"

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);
}

What's new in 7.3?

is_countable()

// 7.2
if (is_array($people) || $people instanceof Countable) {
    // $people is countable
}

What's new in 7.3?

is_countable()

// 7.3
if (is_countable($people)) {
    // $people is countable
}

What's new in 7.3?

  • http://php.net/manual/en/migration73.new-features.php
  • https://hackernoon.com/new-features-of-php-7-3-complete-guide-49d254e43ee1

Lookahead to 7.4

  • Preloading (files in-memory)
  • Typed properties (public string $name;)
  • ext-hash always enabled
  • Password Hashing Registry
  • Null Coalescing Assignment Operator
// current
$data['date'] = $data['date'] ?? new DateTime();
// new
$data['date'] ??= new DateTime();

https://stitcher.io/blog/new-in-php-74


Latest Versions

  • Laravel: 5.7.21
  • Symfony: 4.2.2
  • Drupal: 8.6.7
  • PHPStorm: 2018.3.3
  • VSCode: 1.30.2

PHP Conferences - January

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


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


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/


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


Upcoming regional events

Oct 13-15 - All Things Open - http://allthingsopen.org


Notable News & Articles


Next Month @ TrianglePHP

TDB Presented By YOU?!?!

Thursday, February 21, 6pm @ Atlantic BT

Need an Idea?

  • Testing
  • Security
  • Performance
  • Git

Have a Job/Need a Job

Who's hiring? Who's looking? What are you looking for? Book Swap


Tonight @ TrianglePHP

Apps Without Ops - Web Development in Google Cloud Platform

Presented By - Chris Deaton

Thank you to Atlantic BT for hosting and refreshments!