xref: /php-src/Zend/tests/bug45744.phpt (revision 7aacc705)
1--TEST--
2Bug #45744 (Case sensitive callback behaviour)
3--FILE--
4<?php
5class Foo {
6    public function __construct(array $data) {
7        var_dump(array_map(array($this, 'callback'), $data));
8    }
9
10    private function callback($value) {
11        if (!is_array($value)) {
12            return stripslashes($value);
13        }
14    return array_map(array($this, 'callback'), $value);
15    }
16}
17
18class Bar extends Foo {
19}
20
21new Bar(array());
22
23class Foo2 {
24    public function __construct(array $data) {
25        var_dump(array_map(array($this, 'callBack'), $data));
26    }
27
28    private function callBack($value) {
29    }
30}
31
32class Bar2 extends Foo2 {
33}
34
35new Bar2(array());
36?>
37--EXPECT--
38array(0) {
39}
40array(0) {
41}
42