mirror of
https://github.com/danog/PrimeModule.git
synced 2024-11-26 20:34:37 +01:00
Memoize
This commit is contained in:
parent
ca0fdfd09b
commit
0f2798dc77
@ -253,7 +253,7 @@ class PrimeModule
|
|||||||
if (!extension_loaded('primemodule')) {
|
if (!extension_loaded('primemodule')) {
|
||||||
if (class_exists(FFI::class)) {
|
if (class_exists(FFI::class)) {
|
||||||
try {
|
try {
|
||||||
self::$ffi = FFI::load('/usr/include/primemodule-ffi.h');
|
self::$ffi ??= FFI::load('/usr/include/primemodule-ffi.h');
|
||||||
$result = self::$ffi->factorizeFFI((string) $what);
|
$result = self::$ffi->factorizeFFI((string) $what);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
return $result;
|
return $result;
|
||||||
|
Loading…
Reference in New Issue
Block a user