I am trying to build a better var_dump() (please don’t suggest alternatives; there is a reason – for me – why I am doing so).
Any hints as to how to display the various resource types?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can get the type of the resource using
get_resource_type, which will give you something like “domxml document”. Beyond that it entirely depends on the kind of resource. Every resource is different, there’s no standard way to “output” a resource. You could output gd resources using the image functions, you could print the structure of a DOMXML resource by looping through it, you could… dump the database for mysql resources…? Print a list of files for an FTP resource…?Either you handle each resource individually with custom code, or you just take its type and leave it at that.