An overview of the latest news and interesting developments across PHP from March 2017: new language features, RFCs, community news, upcoming conferences and the latest versions of popular frameworks and platforms.
3. Upcoming Features in PHP RFC
Deprecate and Remove Bareword
(Unquoted) Strings
● Target: 7.2
● tl;dr: Change E_NOTICE to E_WARNING
when using unquoted strings; throw Error
in PHP 8.0.
● Fixes this HUGE caveat in the docs: “Why
is $foo[bar] wrong?” (added May 2001)
○ us3.php.net/manual/en/language.types.arr
ay.php#language.types.array.foo-bar
● wiki.php.net/rfc/deprecate-bareword-string
s
This Currently Works (smh)
$foo = flase; // typo!
// ...
if ( $foo ) {
var_dump($foo); // string(5) "flase"
}
$found = false;
foreach ( $list as $item ) {
if ( is_null($item) ) {
contniue ; // this statement issues a
notice and does nothing
}
// lines assuming $item is not null
}
4. Upcoming Features in PHP RFC
Extended String Types For PDO
● Target: 7.2
● tl;dr: Allows for “national character” type
of SQL-92; used since MySQL 5.7 &
MSSQL 2008
● Bitwise-OR flags to PDO::PARAM_STR:
○ PDO::PARAM_STR_NATL - the value
should be quoted with the N-prefix
○ PDO::PARAM_STR_CHAR - the value
should NOT be quoted with the N-prefix
● PDO::ATTR_DEFAULT_STR_PARAM
○ Says, “what follows is really a Bitwise-OR
to PDO::PARAM_STR
● wiki.php.net/rfc/extended-string-types-for-p
do
$db->quote('über', PDO::PARAM_STR |
PDO::PARAM_STR_NATL); // N'über'
$db->quote('A'); // 'A'
$db->setAttribute(
PDO::ATTR_DEFAULT_STR_PARAM,
PDO::PARAM_STR_NATL);
$db->quote('über'); // N'über'
$db->quote('A', PDO::PARAM_STR |
PDO::PARAM_STR_CHAR); // 'A'
5. CMSes: Drupal
Drupal 8.2.7
● Drupal 8.2.7 - Upgrade!
○ Security Patch
■ Fixes Cross-Site Forgery Requests in Admin
■ Fixes remote-code execution
○ Known Regression (fixed in 8.3, to be released this month)
■ Useful class removed from Search Block: “search-block-form”
○ drupal.org/project/drupal/releases/8.2.7
11. PHP: The Right Way
● No updates in March
phptherightway.com
● Note: Every open-source project can use
your help with documentation. What are
you waiting for?
13. PHP Conferences - Continued
Day Camp for Developers
● June 2 - Online
● daycamp4developers.com
CoderCruise 2017
● July 16-23 - New Orleans, LA
● codercruise.com
14. Nomad PHP (Online) - April 20
Nomad PHP EU - 01:00 PM CDT
Modern SQL
● Elizabeth Smith (@auroraeosrose)
● nomadphp.com/modern-sql
Nomad PHP US - 08:00 PM CDT
Does Your Code Measure Up?
● Adam Culp (@AdamCulp)
● nomadphp.com/does-your-code-measure-
up