Comments (6)
i don't really want to grow the API, so maybe the easiest thing to do here it to add a global config option that disables dump_r from showing the trace info?
from dump_r.php.
Actually, yeah, that'd be ideal. Right now, we're relying on some code to search & replace the incorrect trace info with some info we sniff out ourselves (effectively, our code is doing the same thing as dump_r
, but with a different blacklist of files to ignore in the stack). So, an option to turn off the built-in support for dump_r
to generate this info would be more efficient.
from dump_r.php.
added. try it out.
from dump_r.php.
Only downside with this approach is that you're still reflecting on the stack backtrace to get the information that may or may not be rendered, no?
I also noticed that Core
uses debug_backtrace()
, without passing DEBUG_BACKTRACE_IGNORE_ARGS
, so it's getting a lot more information about the stack than it needs. I believe if you omit the args, it should reduce memory usage and improve performance of what is normally a decently heavy operation.
from dump_r.php.
i've added DEBUG_BACKTRACE_IGNORE_ARGS
and moved the debug_backtrace()
call out of Core::dump_r()
into the global dump_r()
wrapper. feel free to implement your own version of the global dump_r()
on top of Core::dump_r()
.
see b75b5e9
from dump_r.php.
Thank you!
from dump_r.php.
Related Issues (20)
- add extended resource info
- provide debug_backtrace info for each call.
- expand/collaspe all HOT 5
- add max char length for string values, w/ text-overflow: ellipsis
- gen random dump id so key's min-width doesnt affect other dumps
- option to display arrays of simple objects/assoc-arrays as tables HOT 1
- Great library, need "class" support... HOT 3
- Why pass by by reference HOT 7
- allow reference unfolding via cloneNode HOT 5
- apparantly print_r() outputs closure's `parameters`, maybe implement this?
- cli colors HOT 1
- Unicode string support HOT 4
- assoc array bug HOT 2
- Please tag stable versions HOT 5
- allow for configurable paths to alternate css/js for theming
- optionally show whitespace characters/tabs/EOL
- switch to font coloring rather than background coloring
- Multiple dump_r's on a single line breaks variable name output HOT 4
- Option to not output "file-line" contents HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dump_r.php.