Erik Jones wrote:
That's not true, running with v. 5.2.1:
<?php
class A
{
function A() {
echo "works\n";
}
}
$a = new A();
?>
Outputs:
works
On Mar 21, 2007, at 8:06 AM, itoctopus wrote:
They're basically the same thing, however, you can only use
__construct in
PHP5.
He meant that __construct() doesn't work in php4.
It's only available in php5.
php5 does this:
Is the function __construct available?
- Yes? Use it.
- No? Look for a function with the same name as the class. If that's
available, use it.
So it's backwards compatible.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php