1--TEST--
2Test array_map() function : usage variations - failing built-in functions & language constructs
3--FILE--
4<?php
5
6$arg = [1, 2];
7
8// built-in functions & language constructs
9$callbacks = [
10    'echo',
11    'array',
12    'empty',
13    'eval',
14    'isset',
15    'list',
16    'print',
17];
18
19foreach($callbacks as $callback)
20{
21    try {
22        var_dump( array_map($callback, $arg) );
23    } catch (TypeError $e) {
24        echo $e->getMessage(), "\n";
25    }
26}
27
28echo "Done";
29?>
30--EXPECT--
31array_map(): Argument #1 ($callback) must be a valid callback or null, function "echo" not found or invalid function name
32array_map(): Argument #1 ($callback) must be a valid callback or null, function "array" not found or invalid function name
33array_map(): Argument #1 ($callback) must be a valid callback or null, function "empty" not found or invalid function name
34array_map(): Argument #1 ($callback) must be a valid callback or null, function "eval" not found or invalid function name
35array_map(): Argument #1 ($callback) must be a valid callback or null, function "isset" not found or invalid function name
36array_map(): Argument #1 ($callback) must be a valid callback or null, function "list" not found or invalid function name
37array_map(): Argument #1 ($callback) must be a valid callback or null, function "print" not found or invalid function name
38Done
39