Hi,
This is valid syntax since PHP 5.4.0
I’ll elaborate a bit more.
PHP 5.4 itself has been out for years already so I didn’t really think twice about using this syntax.
You should really contact your hosting provider and have them update the version of your PHP install. For many other reasons, not just for my plugin. Running on a version that’s at least more than 4 years old is a very bad idea.
WordPress strongly recommends 5.6 for itself.
I understand where you are coming from. But given that WordPress doesn’t yet require 5.4 or greater, please consider at least add a note to the readme indicating the version requirement.
If only I was taking about one site, we are deploying your plugin on over 200 sites on different hosts. Until WordPress actually requires 5.4+ using syntax from future releases without also confirming that the plugin is compatible with the installed php versions and dumping a site with a fatal seems a little aggressive.
I just updated the plugin (1.1.3) and changed it to the old syntax. Should run without errors now.
Sorry for the inconvenience.
Thanks for prompt and gracious response.
I fully support getting sites bumped to the latest PHP(we had our own issues trying to use DateTIme just requiring 5.3+) but sadly we live in a world of lazy ISPs.