PHP Class Macro helper

Maintainers

Details

github.com/zds-s/macro

Source

Issues

Installs: 5

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/death_satan/macro

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

This package is auto-updated.

Last update: 2025-09-20 16:01:40 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