<?php // Why is this allowed ? class MyDateTimeImmutable extends DateTimeImmutable implements DateTimeInterface { public function format(string $format): string { return 'Why is this allowed?'; } } // And why is this disallowed ? // Fatal error: DateTimeInterface can't be implemented by user classes class MyTime implements DateTimeInterface { }
You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).