-
Recent Posts
Recent Comments
Archives
- March 2022
- December 2021
- November 2021
- October 2021
- September 2021
- January 2021
- November 2020
- September 2020
- July 2020
- January 2020
- December 2019
- July 2019
- December 2018
- June 2018
- April 2018
- March 2018
- January 2018
- November 2017
- September 2017
- July 2017
- March 2017
- December 2016
- October 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- January 2016
Categories
Meta
Author Archives: Mark Baker
Cassie’s First Night
It’s been a long time since I last finished any of the short stories that I write. This short piece was written 8-years ago. For some reason, I was reminded about it just this evening. It isn’t that I don’t … Continue reading
Support the whole PHP Ecosystem
Just a few short weeks ago, for a 24 Days in December post, I wrote about remembering all of the Open Source Maintainers that create and support the tools that we all use as developer in our daily work. It … Continue reading
Reflections on Thought and Expression
For me, it’s been a particularly difficult and traumatic last few months of 2021. Not simply because of the whole covid situation, or the usual stresses of work; but because I started taking therapy over the Summer. I know that … Continue reading
The Wonderful World of Callbacks
Anybody that has read any of my previous blog posts or looked at my code samples before should know that I’m a big fan of using callbacks. Whether it’s simply using callbacks with those standard functions that accept them as … Continue reading
Posted in PHP
Tagged Anonymous Function, Arrow Function, Callback, Closure, PHP, PHP 8
Leave a comment
ReadOnly Gotchas – A few more limitations with PHP 8.1 ReadOnly Properties
Last month I wrote about the new readonly properties in PHP 8.1, and the difficulties if you want to clone an object that uses them (together with a couple of potential solutions to that problem). The inability to clone an … Continue reading
Constant Constants. Finally! (On the inconstancy of constants)
One of the many new features of PHP 8.1 is the ability to declare class constants as final, so that they can no longer be overridden in child classes. The same applies when constants are defined as final in an … Continue reading
The Tears of a Clone
On the face of it, the new readonly properties in PHP 8.1 seem really useful for Value Objects and Data Transfer Objects: both should be immutable; setting property values should always be handled in the constructor, so no setters; and … Continue reading
Closure Binding for Unit testing of Private and Protected Methods
Some years ago, I wrote about using closure binding to access protected and private properties when unit testing an object, to verify internal state; and I created the SpyMaster library to simplify that task. One feature that I didn’t include … Continue reading
Spreading the News – An Exploration of PHP’s Spread Operator
A few days ago, I wrote about array unpacking and variadic arguments in PHP8. I’m a big fan of these features, and use them extensively, and the changes in PHP8 make them even more useful.
Named Arguments and Variadics in PHP 8
One of the new features of PHP 8 is named arguments. It’s one of those features that I love as an end user developer; although it can be a nightmare for library and framework developers, because argument names are now … Continue reading