3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Animal{ protected $isAlive; public function __construct(){ $this->isAlive = true; } public function isAlive(){ return $this->isAlive; } } class Cat extends Animal{ public function __construct(){ //we forgot something... } } $cat = new Cat(); var_dump($cat->isAlive());

preferences:
53.06 ms | 402 KiB | 5 Q