Skip to content

Commit

Permalink
Add check for PHP version to make the code work on PHP 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor Nelyubov committed Jul 12, 2021
1 parent 2cc87fd commit ad2d34e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Codeception/Lib/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ public static function getClassesFromFile($file)
}
}

$tokens = null;
gc_mem_caches();
if (PHP_MAJOR_VERSION > 5) {
$tokens = null;
gc_mem_caches();
}

return $classes;
}
Expand Down

0 comments on commit ad2d34e

Please sign in to comment.