This repository was archived by the owner on Jan 31, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -90,11 +90,12 @@ public function check()
9090 return new Skip ('APC has not been enabled in CLI. ' );
9191 }
9292
93- if (! function_exists ('apc_sma_info ' )) {
93+ $ memoryAllocationMethod = \PHP_VERSION_ID < 70000 ? 'apc_sma_info ' : 'apcu_sma_info ' ;
94+ if (! function_exists ($ memoryAllocationMethod )) {
9495 return new Warning ('APC extension is not available ' );
9596 }
9697
97- if (! $ info = apc_sma_info ()) {
98+ if (! $ info = $ memoryAllocationMethod ()) {
9899 return new Warning ('Unable to retrieve APC memory status information. ' );
99100 }
100101
Original file line number Diff line number Diff line change @@ -46,11 +46,12 @@ public function check()
4646 return new Skip ('APC has not been enabled in CLI. ' );
4747 }
4848
49- if (! function_exists ('apc_sma_info ' )) {
49+ $ memoryAllocationMethod = \PHP_VERSION_ID < 70000 ? 'apc_sma_info ' : 'apcu_sma_info ' ;
50+ if (! function_exists ($ memoryAllocationMethod )) {
5051 return new Warning ('APC extension is not available ' );
5152 }
5253
53- if (! $ this ->apcInfo = apc_sma_info ()) {
54+ if (! $ this ->apcInfo = $ memoryAllocationMethod ()) {
5455 return new Warning ('Unable to retrieve APC memory status information. ' );
5556 }
5657
You can’t perform that action at this time.
0 commit comments