mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

RFC: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types Co-authored-by: Gina Peter Banyard <girgias@php.net>
16 lines
458 B
PHP
16 lines
458 B
PHP
--TEST--
|
|
Additional optional parameters must have a matching prototype
|
|
--FILE--
|
|
<?php
|
|
|
|
interface DB {
|
|
public function query($query, string ...$params);
|
|
}
|
|
|
|
class MySQL implements DB {
|
|
public function query($query, ?int $extraParam = null, string ...$params) { }
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Declaration of MySQL::query($query, ?int $extraParam = null, string ...$params) must be compatible with DB::query($query, string ...$params) in %s on line %d
|