Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update index.php #35

Closed
wants to merge 1 commit into from
Closed

Update index.php #35

wants to merge 1 commit into from

Conversation

AndrewChamp
Copy link

No description provided.

@AndrewChamp
Copy link
Author

The __ is missing before autoload()

Should be like this __autoload()

Also, if you make the require into a require_once php won't look for it again if it's called to again (instantiated twice).

@panique
Copy link
Owner

panique commented Mar 20, 2013

Hey, no, it's intentionally "autoload", because __autoload is something different. __autoload is a PHP internal autoloader, which is deprecated with PHP 5.4 and will be removed in PHP 5.5. Beside that, __autoload makes problems when using namespaces and blabla... ;) ... So i build an "own" autoloader, called autoload, which is called via spl_autoload_register(), like the PHP PSR standard says we should build our apps in future. I know, this seems strange at first, but as this is some kind of "official" solution (see "PSR-0" coding standard) i think it's "good".

@panique panique closed this Mar 20, 2013
@AndrewChamp
Copy link
Author

Ah, you are right. Thanks for the info! I didn't realize they were deprecating it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants