Java - toString() <-> php - ?

From: Date: Tue, 02 Aug 2005 01:00:33 +0000
Subject: Java - toString() <-> php - ?
Groups: php.general 
Request: Send a blank email to php-general+get-219806@lists.php.net to get a copy of this message
To print "state" of object in Java I can define toString() function and then I can do something like this: Java exemple: ************************************* import java.io.*; import java.util.*; public class ReadTextFromFile { private static String line; private static String Fable = new String (""); private static String NomFable; private static int cptLine = 0; private static int nbrPersonnes = 0; private static String nomPersonnes = new String (""); private static ArrayList AListe = new ArrayList(nbrPersonnes); //********************************************************************************** public String toString() { return getClass().getName() + " [ Nom de la fable: "+ NomFable + " <==> Nombre de personnes dans dialogue: " + nbrPersonnes + " ] " ; } *********************************************************************************** Is there similar kind of function in php that help us to print the state of object in his "life evolution"? Thanks ADI

« previous php.general (#219806) next »