3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HttpClient { //public function request(string $method, string $url) public function request(string $method, string $url, array $options = []) { } } class HttpClientDecorator extends HttpClient { public function request(string $method, string $url) {} }
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.24, 8.2.0 - 8.2.11
Fatal error: Declaration of HttpClientDecorator::request(string $method, string $url) must be compatible with HttpClient::request(string $method, string $url, array $options = []) in /in/rXi7F on line 13
Process exited with code 255.

preferences:
159.47 ms | 1431 KiB | 7 Q