Jump to content
xisto Community
Sign in to follow this  
veerumits

Php Iteration - Object Overloading Difference between iteration and overloading

Recommended Posts

i want to know that what is the difference between iteration and object overloading in PHP.
i read that both are same object overloading is old name of iteration, but i have doubt so please any one can help in this regard

what i know that :
* Iteration :- Loop the object
* used to Display property name and class value.
* foreach loop used : - only used in array and object iteration.
here i give example of iteration:

<?phpclass abc{var $user="Raju"; var $city="Delhi";var $age= 25;}$obj=new abc;echo "<table border=1>";echo "<tr><td> property Name </td><td> property Value </td></tr>";foreach($obj as $p=> $x){ echo "<tr><td> $p </td><td> $x</td> </tr>"; }echo "</table>";?>

output:-

property Name property Value
user Raju
city Delhi
age 25

every thing is fine but i am not fully understood this.

how it works. what is the behavior of this iteration. how we can say that it is object overload.

thanks

Share this post


Link to post
Share on other sites

You know, veerumits, this is not really a tutorial. You are not really explaining things, you are rather like asking for an explanation.That's why I moved your topic here, where is most probably it's place.RegardsYordan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.