Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output formatting #9

Open
tablatronix opened this issue Feb 5, 2015 · 1 comment
Open

output formatting #9

tablatronix opened this issue Feb 5, 2015 · 1 comment

Comments

@tablatronix
Copy link

very nice
It would be nice if its output was more matched to var_dump
datatype(length) value for example

string(5) "item1"
as opposed to
(string) 'item1' (5 chars)

// var_dump output
object(SimpleXMLElement)#4 (1) {
  ["item"]=>
  string(5) "item1"
}

also if you pass a custom class to it, it is not reflected in output

// simplexml_load_string($xml, 'SimpleXMLExtended')
// var_dump output
object(SimpleXMLExtended)#4 (1) {
  ["item"]=>
  string(5) "item1"
}
@IMSoP
Copy link
Owner

IMSoP commented Mar 15, 2021

As of PHP 5.6, you can actually over-ride the behaviour of var_dump et al by defining the __debugInfo magic method, so I plan to rewrite this library on that basis.

If I can get a satisfactory format there, I will then try to implement it in PHP itself, so that the library becomes redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants