3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Model {} class PlayerModel extends Model {} abstract class Repository { abstract public function save(Model $model); } class PlayerRepository extends Repository { public function save(PlayerModel $model) { print get_class($model); } } $player = new PlayerModel(); $repository = new PlayerRepository(); $repository->save($player);

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch master
Fatal error: Declaration of PlayerRepository::save(PlayerModel $model) must be compatible with Repository::save(Model $model) in /in/nikF1 on line 13
Process exited with code 255.
Output for branch master_jit
Fatal error: Declaration of PlayerRepository::save(PlayerModel $model) must be compatible with Repository::save(Model $model) in /in/nikF1 on line 13
Process exited with code 255.

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