Category: macro

How to Make Modern PHP More Modern? With Preprocessing!

Let’s have a bit of fun. A while ago, I experimented with PHP macros, adding Python range syntax. Then, the talented SaraMG mentioned an RFC, and LordKabelo suggested instead adding C#-style getters and setters to PHP. Aware of how painfully slow it can be for an outsider to suggest and implement a new language f...

Fun and Functional Programming in PHP with Macros

I was so excited about my previous article about PHP macros, that I thought it would be fun for us to explore the intersection of macros and functional programming. PHP is already full of functions, with object oriented patterns emerging relatively late in its life. Still, PHP’s functions can be cumbersome, especiall...

PHP Macros for Fun and Profit!

I was originally going to call this “Micro Macros with Márcio Perfectly Pragmatic Pre-Processor library”, but I didn’t think Bruno would approve… I get really excited when developers feel empowered to create new tools, and even new languages with which to solve their problems. [author_more] You see, many devel...