3v4l.org

run code in 500+ 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();
Output for git.master

Process exited with code 139.
Output for git.master_jit
Deprecated: ThirdParty::run(): Implicitly marking parameter $a as nullable is deprecated, the explicit nullable type must be used instead in /in/0orf9 on line 21 Fatal error: Uncaught TypeError: Cannot assign null to property MyLib::$a of type string in /in/0orf9:16 Stack trace: #0 /in/0orf9(22): MyLib->process(NULL) #1 /in/0orf9(28): ThirdParty->run() #2 {main} thrown in /in/0orf9 on line 16
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.99 ms | 507 KiB | 4 Q