Basically I just want to require "some.class.php"; and know what class is inside that file.
The answer is:
Get the last value of the function get_declared_classes
Basically I just want to require "some.class.php"; and know what class is inside that file.
The answer is:
Get the last value of the function get_declared_classes
require "Some.class.php";
$loadedClasses = get_declared_classes();
$lastClass = array_pop($loadedClasses);
echo "Last loaded class is $lastClass";