3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Car { const CAR_TYPE = 'CAR'; protected static $carName = 'Terry'; public function __construct() { printf("My name is %s, I'm a %s\n\n", self::$carName, self::CAR_TYPE); } } class Ferrari extends Car { const CAR_TYPE = 'FERRARI'; protected static $carName = 'Fred'; } $car = new Car(); $ferrari = new Ferrari();
based on W4v4s