PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Guy
Forum Commoner
Posts: 53 Joined: Sun Jan 12, 2003 3:34 am
Post
by Guy » Tue Feb 04, 2003 4:25 am
i tried to do this:
i get an error and need to do this:
Code: Select all
$obj = new myObj();
$obj->Print();
is it possible to do it the first way?
Guy
bionicdonkey
Forum Contributor
Posts: 132 Joined: Fri Jan 31, 2003 2:28 am
Location: Sydney, Australia
Contact:
Post
by bionicdonkey » Tue Feb 04, 2003 4:30 am
it looks like u are trying to create a new alias for a pre-definded function. why??
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Tue Feb 04, 2003 4:39 am
AFAIK, it is not possible to use the syntax in your first method.
Mac
bionicdonkey
Forum Contributor
Posts: 132 Joined: Fri Jan 31, 2003 2:28 am
Location: Sydney, Australia
Contact:
Post
by bionicdonkey » Tue Feb 04, 2003 4:49 am
i don't think it would be legal...looks pointless
Guy
Forum Commoner
Posts: 53 Joined: Sun Jan 12, 2003 3:34 am
Post
by Guy » Tue Feb 04, 2003 6:32 am
if it is possible in php also.
it makes a nicer code in my opinion.
because i only want to print the object and destroy it afterwards.