Skip to content

PHP 4 Constructors and PHP5 Namespaces Don’t Mix

Using a class defined in a namespace will disable a legacy Constructor.
All classes in namespaces *must use* __construct.

You might run into this problem trying to convert an old library to be PSR-2 (autoloader) compliant. If you want to use a legacy library in Laravel or Symfony, you’ll have to watch out for this.

Published inUncategorized