Skip to content
Advertisement

Displaying get_defined_vars() as an array which can contain html in values

As the title says, I want to make a “debug” site that displays the get_defined_vars() vars as an array.

It seems like some variables contain or can contain HTML or even dynamic code like PHP.

First I tried the classic:

JavaScript

then I played with htmlentities() and htmlspecialchars() commands and wrote this:

JavaScript

this takes forever and outputs a blank sheet 🙂

What would be the best way to do this?

Advertisement

Answer

maybe try this :

JavaScript

E_ALL not ALL 😉

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement