Answer the question
In order to leave comments, you need to log in
dumper() php function, why doesn't it see the array?
Guys, hello everyone, please help)
I'm learning php and the dumper() function is explained in the tutorial;
Below is the code from the tutorial.
The following is not clear. Why, if if else is removed from the body of the dumperGet function, then it gives an error (in the screenshot), but everything is fine with the if. Moreover, if you comment out the check for an object or a boolean, it still works correctly.
Answer the question
In order to leave comments, you need to log in
This is a recursion, the function calls itself bypassing the array, i.e. each element in the array will be processed, when the value is an array, then there is no problem, because there is a for loop, but when the value is no longer an array, you commented out the code return "$obj"
, in this case the string falls into the loop functions that cannot work with strings
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question