function array_fill( int $start_index, int $num, mixed $value ): array|false {}
<?php
try {
var_dump(array_fill(0, -100, "foobar"));
} catch( Throwable $e ) {
echo get_class( $e ), ': ', $e->getMessage();
}
?>
Warning: array_fill(): Number of elements can't be negative
ValueError: array_fill(): Argument #2 ($num) must be greater than or equal to 0