What happens to a class in PHP once its been instantiated?

Posted by Caylem on Stack Overflow See other posts from Stack Overflow or by Caylem
Published on 2010-06-08T07:00:50Z Indexed on 2010/06/08 7:12 UTC
Read the original article Hit count: 226

Filed under:
|
|
|
|

Hi

I'm just playing around with some PHP and was wondering what happens when an object from a class is created within another PHP script?

I assume once its created and been processed their is no way of then going back and 'playing' around with it from another script?

The idea is i'm trying to create a kind of deck of cards using a card class, each card has specific data that is added to each individual object to make it unique, suit, value etc. Once its created i need to be able to go back to specific cards to use them. In java i'd have an arraylist of card objects, i'm not sure how to approach the same area in PHP.

Thanks.

© Stack Overflow or respective owner

Related posts about php

Related posts about arrays