Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 132,462 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,369 people online right now. Registration is fast and FREE... Join Now!




PHP 4 Overload() Function

 
Reply to this topicStart new topic

PHP 4 Overload() Function, I can't believe I didn't know this!

snoj
post 31 Mar, 2005 - 05:59 AM
Post #1


$Null

Group Icon
Joined: 31 Mar, 2003
Posts: 3,304



Thanked 5 times

Dream Kudos: 700
My Contributions


PHP4 does have class overloading!

http://php.net/manual/en/function.overload.php


This will help me out tons! Woohoo! Did anyone else know about this?
User is offlineProfile CardPM

Go to the top of the page

Amadeus
post 31 Mar, 2005 - 06:40 AM
Post #2


g++ -o drink whiskey.cpp

Group Icon
Joined: 12 Jul, 2002
Posts: 12,173



Thanked 33 times

Dream Kudos: 25
My Contributions


It's not something I've used due to some of the limitations...it should be noted that this is not true overloading, it mimics overloading (and is not really the same as what is meant by overloading in other languages). Weakly typed languages such as PHP will have troubles using the overload function specified in certain cases, especially with nested classes (IIRC).

It's certainly sufficient for dynamic allocation of instances, but you may well run into trouble with true method overloads.

Having said all that, I have not fully explored it's use.
User is online!Profile CardPM

Go to the top of the page

cyberscribe
post 31 Mar, 2005 - 08:42 AM
Post #3


humble.genius

Group Icon
Joined: 5 May, 2002
Posts: 1,062



Thanked 2 times

Dream Kudos: 154
My Contributions


I learn something new every day. smile.gif
User is offlineProfile CardPM

Go to the top of the page

born2c0de
post 1 Apr, 2005 - 12:50 AM
Post #4


printf("I'm a %XR",195936478);

Group Icon
Joined: 26 Nov, 2004
Posts: 3,905



Thanked 34 times

Dream Kudos: 2800

Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions


QUOTE(cyberscribe @ Mar 31 2005, 10:12 PM)
I learn something new every day. smile.gif

I know what I learnt 2day about PHP... wink2.gif
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 01:01PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month