Skip to content

amitsnyderman/php-memoize-trait

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP Memoize Trait

Usage

Prefix any method name with an underscore (_) to memoize calls to that method.

$instance = new Object();
$instance->method();  // normal
$instance->_method(); // memoized

Note: Requires special consideration when your class (or a super class) already implements the magic __call method.

Test

% phpunit tests/MemoizeTest.php 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages