1
0
mirror of synced 2025-02-09 00:39:25 +03:00

compute size of loaders beforehand and not on each iteration

This commit is contained in:
Simone Gentili 2017-05-15 07:41:07 +02:00
parent e9b54de488
commit 0a801b895e

View File

@ -35,7 +35,8 @@ class SetupTest extends OrmTestCase
set_include_path($this->originalIncludePath);
$loaders = spl_autoload_functions();
for ($i = 0; $i < count($loaders); $i++) {
$numberOfLoaders = count($loaders);
for ($i = 0; $i < $numberOfLoaders; $i++) {
if ($i > $this->originalAutoloaderCount+1) {
spl_autoload_unregister($loaders[$i]);
}