3v4l.org

run code in 500+ PHP versions simultaneously
<?php class PHPlt84 { function bar(int $a = null, array $b) {} } class PHPlt84Child extends PHPlt84 { function bar(?int $a, array $b) {} } class PHPgte71 { function bar(?int $a, array $b) {} } class PHPgte71Child extends PHPgte71 { function bar(int $a = null, array $b) {} }
Output for 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Deprecated: PHPlt84::bar(): Implicitly marking parameter $a as nullable is deprecated, the explicit nullable type must be used instead in /in/0qM7W on line 4 Deprecated: PHPgte71Child::bar(): Implicitly marking parameter $a as nullable is deprecated, the explicit nullable type must be used instead in /in/0qM7W on line 16
Output for 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30

preferences:
68.62 ms | 975 KiB | 4 Q