@robledoKari@twitter.com @SwiftOnSecurity@twitter.com @AJClay16@twitter.com I wrote this last year for PHP, but a lot of the concepts (i.e. using prepared statements to stop SQL injection) are generalizable.
PHP 7.4 alpha 1 released, with typed properties, arrow functions, covariant types, FFI, preloading and more. Please test and report issues. If you have open-source libraries, you can add 7.4snapshot on Travis.
🕸️ Embed WebAssembly anywhere
More? See the thread.
Security updates are out for 3.30.6, and 4.3-4.8, addressing issues in FastCGI and scrypt_enc(); additionally, 4.9.0 is out, unifying several previously-configurable behaviors, and removing the option to enable PHP support.
Starting from PHP 7.4, __toString() will be able to throw exceptions. https://wiki.php.net/rfc/tostring_exceptions
Another #PHP RFC passed!
$otherArray = [3, 4];
$array = [1, 2, ...$otherArray];
The spread operator in arrays RFC (https://wiki.php.net/rfc/spread_operator_for_array) has been accepted for PHP 7.4:
$ary = [3, 4, 5];
return [1, 2, ...$ary]; // same as [1, 2, 3, 4, 5]
Caveat: The unpacked array/Traversable can only have integer keys. For string keys array_merge() is still required.
PHP is officially a thought-leader.
EREBODY is breaking APIs for no obvious reason and calling it progress. https://twitter.com/davidcelis/status/1124436319705296896
Arrow functions / short closures have been accepted for PHP 7.4: https://wiki.php.net/rfc/arrow_functions_v2
cc #phpc, would you like to see the `arraykey` type from hacklang come to PHP ?
I blogged today about messing around with PHP 7.4's FFI extension, as well as the rabbit holes that ensue from there: https://blog.ircmaxell.com/2019/04/compilers-ffi.html
Welcome to the PHP Community on Mastodon! We're a friendly little Mastodon instance providing a place for PHP developers to discuss topics related to PHP, as well as topics unrelated to PHP. First and foremost, we're about building community, and that doesn't always involve technical discussion, so feel free to go off-topic and have fun.
Before you get started, make sure you check out our code of conduct.
Thank you to Jakob Westhoff for allowing the use of the photograph "elePHPants walking through the light."