xref: /PHP-8.0/ext/spl/tests/fixedarray_009.phpt (revision 960318ed)
1--TEST--
2SPL: FixedArray: Trying to instantiate passing string to constructor parameter
3--FILE--
4<?php
5
6try {
7    $a = new SplFixedArray('FOO');
8} catch (TypeError $iae) {
9    echo "Ok - ".$iae->getMessage().PHP_EOL;
10}
11?>
12--EXPECT--
13Ok - SplFixedArray::__construct(): Argument #1 ($size) must be of type int, string given
14