01/17/2019
The January version of the "Latest in PHP" is out! Shared at our monthly TrianglePHP meeting, here are the things you need to know. If you'd like the raw slides or use this as a starting point for your own meetup, please visit our GitHub Repository.
http://php.net/supported-versions.php
Links:
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
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"
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);
}
is_countable()
// 7.2
if (is_array($people) || $people instanceof Countable) {
// $people is countable
}
is_countable()
// 7.3
if (is_countable($people)) {
// $people is countable
}
http://php.net/manual/en/migration73.new-features.php
https://hackernoon.com/new-features-of-php-7-3-complete-guide-49d254e43ee1
public string $name;
)ext-hash
always enabled// current
$data['date'] = $data['date'] ?? new DateTime();
// new
$data['date'] ??= new DateTime();
https://stitcher.io/blog/new-in-php-74
Day Camp 4 Developers: Beyond Performance January 18, Online https://phpa.me/daycamp-4-devs
SunshinePHP 2019 February 7–9, Miami, FL http://sunshinephp.com
PHP UK Conference 2019 February 20–22, London, England https://www.phpconference.co.uk
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
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
Oct 13-15 - All Things Open - http://allthingsopen.org
TDB Presented By YOU?!?!
Thursday, February 21, 6pm @ Atlantic BT
Need an Idea?
Who's hiring? Who's looking? What are you looking for? Book Swap