Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| <?php | |
| function memoize($target) { | |
| static $memo = new WeakMap; | |
| return new class ($target, $memo) { | |
| function __construct( | |
| protected $target, | |
| protected &$memo, | |
| ) {} |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors