Hello, I have looked around for information on using multiple constructors with OO PHP. I have found little, and from what I have seen I'm thinking that it's not supported. Is this true. I wrote the code below to try to emulate multiple constructors.. is this what everyone else does to try to get the same functionality?
thanks, -- [EMAIL PROTECTED] "Bad spellers of the world untie!" #!/usr/bin/php4 <?php $args = $_SERVER['argv']; if($args[0]){ $tc = new TestCon($args[1]); } else{ $tc = new TestCon(); } class TestCon{ function TestCon($name = NULL){ if($name){ $this->doIt($name); } else{ $this->doIt("User"); } } function doIt($string){ echo "Hello $string\n"; } } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php