PHP Class Macro helper

v1.0 2022-07-04 14:38 UTC

This package is auto-updated.

Last update: 2024-10-20 13:58:10 UTC


README

class Test{
    use \DeathSatan\Macro\Macro;
}

Test::macro('test',function ($a){
    return $a;
},true);

Test::macro('demo',function ($a){
    return $a;
},false);

var_dump(Test::test(123));//123
var_dump((new Test)->demo(321));//321