xref: /PHP-7.2/Zend/tests/bug45744.phpt (revision 17ccbeec)
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--EXPECT--
37array(0) {
38}
39array(0) {
40}
41