basta usare var_dump() con un po' di furbizia

cmq alcuni editor come phpedit hanno anche una funzione debugger... ma non l'ho mai usata