summaryrefslogtreecommitdiff
path: root/Zend/tests/function_arguments/argument_count_incorrect_internal_strict.phpt
blob: 8775bece880287ceff3d5c79ef8fb4d2f2151128 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Call internal function with incorrect number of arguments with strict types
--FILE--
<?php
declare(strict_types=1);
try {
	substr("foo");
} catch (\Error $e) {
	echo get_class($e) . PHP_EOL;
	echo $e->getMessage() . PHP_EOL;
}

array_diff([]);
--EXPECTF--
ArgumentCountError
substr() expects at least 2 parameters, 1 given

Warning: array_diff(): at least 2 parameters are required, 1 given in %s