In Python I normally do print type(someObject)
to view the type of a variable value. I now need to do a similar thing in php in which I want to print the type to the syslog. So I do this:
syslog(LOG_ERR, gettype($myObject));
The result is
Apr 30 13:54:09 php0 php: object
I presume the object is an instance of a my class called ReceivedMail
, but since it just prints out object
I have no way of knowing this.
Is there a way to print the type of an object (or the class it was instantiated from) to the syslog in php? All tips are welcome!