PHPNews

Destructuring arrays in PHP: Practical examples

Being more focussed on JavaScript nowadays, I kinda forgot that it’s possible to destructure arrays in PHP ever since the release of PHP 7.1 . Frank de Jonge provides us with some practical examples such as this simple one: // JavaScript let options = {enabled: true, compression: 'gzip'}; let { enabled, …

Continue reading »

Written by Bram.us - - Aggregated on Thursday May 3, 2018


“last 2 versions” considered harmful

When using babel-preset-env with the list of supported browsers set to "last 2 versions" – which I am doing used to do – you’re basically supporting browsers that are dead or have no users. Take Internet Explorer for example. It’s been replaced by Edge and will never have any new versions after Internet …

Continue reading »

Written by Bram.us - - Aggregated on Thursday May 3, 2018


Best Practices With CSS Grid Layout

Rachel Andrew: An increasingly common question — now that people are using CSS Grid Layout in production — seems to be “What are the best practices?” The short answer to this question is to use the layout method as defined in the specification. The particular parts of the spec you choose to use, and indeed how you …

Continue reading »

Written by Bram.us - - Aggregated on Thursday April 26, 2018


The dots do matter: how to scam a Gmail user

Recently James Fisher received an email from Netflix asking him to update his credit card information. “Odd,” I thought, “but OK, I’ll check.” The email is genuinely from netflix.com , so I clicked the link. It logged me in and took me to an “Update your credit or debit card” page, which is genuinely hosted on …

Continue reading »

Written by Bram.us - - Aggregated on Thursday April 26, 2018


React v16.3.0: New Lifecycle Events and Context API

React 16.3.0 just got released. Next to being able to forward refs and some changes to the lifecycle events it also sports a new Context API which I’ve written about before . Even though the introductory blogpost over at the React blog is very detailed, the video below – covering the new Context API – forms a …

Continue reading »

Written by Bram.us - - Aggregated on Thursday March 29, 2018


Instagram Terminal Feed

Forget about that Instagram for Windows 95 , and go for the real deal: Instagram on the CLI: Sometimes checking your instagram during work is kind of strange, so why not check your instagram inside your terminal? OK… I know checking this during work is still strange… To be honest, I did this just for pure …

Continue reading »

Written by Bram.us - - Aggregated on Thursday March 29, 2018


How CSS’s display: contents; works

You might know that display: contents; does what it states it does: it only shows an element’s contents, just as if you were to remove the opening and closing tag. But what about the element’s attributes? What about the bound JavaScript events? What about … ? Ire Aderinokun digs deeper. How display: contents; …

Continue reading »

Written by Bram.us - - Aggregated on Wednesday March 28, 2018