get_object_vars(),
get_class_vars(),
get_class_methods()

Andrey

----- Original Message ----- 
From: "Filippo Veneri" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 1:28 PM
Subject: [PHP] object reflection in php?


> Is there a way to get the name of a filed
> from a variable pointing to some object?
> 
> Just to make myself understood:
> 
> class obj {
>    var $field;
>    function obj( $value ) {
>      $this->field = $value;
>    }
> }
> 
> $o = new obj( "field value" );
> 
> How can i know, if possible,  that the instance of
> obj pointed to by $o has a field named "field"?
> 
> This would be useful to write an object to a database
> without knowing its structure 'a-priori'.
> 
> Thanks
> 
> fbv
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to