views:

156

answers:

2

What would be the proper way to explode a COM object for debugging? I have a 3rd party function that returns a multilevel object. The documentation is non existant, so I'd like to be able to echo everything out of the object or debug it in Komodo IDE.

Komodo just says Object and nothing else. Maybe convert to array?

I know some of the existing options such as $com->Status, but there are more variables returned that I'd like to know what they are.

A: 

It is weird that var_dump didn't work.

But you could try with other of php reflection tools.

Reflection Class:

<?php
Reflection::export(new ReflectionClass(get_class($data)));
?>

Or you could try with the get_class_methods:

<?php
  print_r(get_class_methods($data));
?>

or get_object_vars to see its fields:

<?php
  print_r(get_object_vars($data));
?>

Hope this helps.

elviejo
reflection returns `Class [ class variant ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [0] { } }`. `print_r(get_class_methods($data));` returns `Array()`. `print_r(get_objcet_vars($data));` returns function not found
shaiss
typo use: get_object_vars instead of: get_objcet_vars
elviejo
no luck with that either. Thanks for the info
shaiss
A: 
fireweasel
This is a bit late. But I'll double check this when I revist this project shortly.
shaiss