Hi people! Since I couldnt get answers from Stackoverflow I desiced to ask you.
Can someone explain how does these 2 functions work:
class_exists()
spl_autoload_register()
Class exist function
if(class_exists('User')){
echo "It does exists";
}
class User {
/*
Some code here
*/
}
// the output of file is "It does exists"
So how does this function works? Scans whole file? Whole directory? I mean its called before I defined class.
Spl autoload register function
include 'functions.php'; // <- file where is the function class_exist('User') a