004+ Fatal error: Uncaught TypeError: Argument 2 passed to array_walk() must be callable, boolean given in %s/array_walk_closure.php:6
005+ Stack trace:
006+ #0 %s/array_walk_closure.php(6): array_walk(false, false)
007+ #1 {main}
008+ thrown in %s/array_walk_closure.php on line 6
004- Warning: array_walk() expects parameter 1 to be array, boolean given in %s on line %d
005- NULL
006-
007- Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d
008- NULL
009- array(2) {
010- [0]=>
011- int(1)
012- [1]=>
013- string(3) "one"
014- }
015- array(2) {
016- [0]=>
017- int(2)
018- [1]=>
019- string(3) "two"
020- }
021- array(2) {
022- [0]=>
023- int(3)
024- [1]=>
025- string(5) "three"
026- }
027- bool(true)
028-
029- closure with array
030- array(1) {
031- ["sum"]=>
032- int(42)
033- }
034- array(1) {
035- ["sum"]=>
036- int(43)
037- }
038- array(1) {
039- ["sum"]=>
040- int(45)
041- }
042- bool(true)
043- End result:int(42)
044-
045- closure with use
046- array(1) {
047- ["sum"]=>
048- int(42)
049- }
050- array(1) {
051- ["sum"]=>
052- int(43)
053- }
054- array(1) {
055- ["sum"]=>
056- int(45)
057- }
058- bool(true)
059- End result:int(48)
060-
061- closure with object
062- object(stdClass)#1 (1) {
063- ["sum"]=>
064- int(42)
065- }
066- object(stdClass)#1 (1) {
067- ["sum"]=>
068- int(43)
069- }
070- object(stdClass)#1 (1) {
071- ["sum"]=>
072- int(45)
073- }
074- bool(true)
075- End result:int(48)
076-
077- function with object
078- object(stdClass)#2 (1) {
079- ["sum"]=>
080- int(42)
081- }
082- object(stdClass)#2 (1) {
083- ["sum"]=>
084- int(43)
085- }
086- object(stdClass)#2 (1) {
087- ["sum"]=>
088- int(45)
089- }
090- bool(true)
091- End result:int(48)
092-
093- function with array
094- array(1) {
095- ["sum"]=>
096- int(42)
097- }
098- array(1) {
099- ["sum"]=>
100- int(42)
101- }
102- array(1) {
103- ["sum"]=>
104- int(42)
105- }
106- bool(true)
107- End result:int(42)
108-
109- closure and exception
110- array(2) {
111- [0]=>
112- array(2) {
113- ["function"]=>
114- string(9) "{closure}"
115- ["args"]=>
116- array(2) {
117- [0]=>
118- int(2)
119- [1]=>
120- string(3) "two"
121- }
122- }
123- [1]=>
124- array(4) {
125- ["file"]=>
126- string(%d) "%s"
127- ["line"]=>
128- int(%d)
129- ["function"]=>
130- string(10) "array_walk"
131- ["args"]=>
132- array(2) {
133- [0]=>
134- &array(3) {
135- ["one"]=>
136- int(1)
137- ["two"]=>
138- int(2)
139- ["three"]=>
140- int(3)
141- }
142- [1]=>
143- object(Closure)#2 (1) {
144- ["parameter"]=>
145- array(2) {
146- ["$v"]=>
147- string(10) "<required>"
148- ["$k"]=>
149- string(10) "<required>"
150- }
151- }
152- }
153- }
154- }
155- Done