3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A extends B { public function get($name, array $options = null){} } class B { public function get($name, $options = [], $usePeeringServiceManagers = true){} }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
Fatal error: Declaration of A::get($name, ?array $options = null) must be compatible with B::get($name, $options = [], $usePeeringServiceManagers = true) in /in/4sdoZ on line 5
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Warning: Declaration of A::get($name, ?array $options = NULL) should be compatible with B::get($name, $options = Array, $usePeeringServiceManagers = true) in /in/4sdoZ on line 5
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33
Warning: Declaration of A::get($name, ?array $options = NULL) should be compatible with B::get($name, $options = Array, $usePeeringServiceManagers = true) in /in/4sdoZ on line 3
Output for 7.0.0 - 7.0.33
Warning: Declaration of A::get($name, array $options = NULL) should be compatible with B::get($name, $options = Array, $usePeeringServiceManagers = true) in /in/4sdoZ on line 3
Output for 5.6.38 - 5.6.40
Strict Standards: Declaration of A::get() should be compatible with B::get($name, $options = Array, $usePeeringServiceManagers = true) in /in/4sdoZ on line 4

preferences:
81.84 ms | 411 KiB | 5 Q