3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class BaseLib { abstract protected function process( $a ); } class MyLib extends BaseLib { //protected $a; protected string $a; public function run( string $a ) { $this->process( $a ); } protected function process( $a ) { $this->a = $a; } } class ThirdParty extends MyLib { public function run( string $a = null ) { $this->process( $a ); } } $third_party_code = new ThirdParty(); $third_party_code->run();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
146.94 ms | 1110 KiB | 8 Q