$ ./guess_the_languageProgramming Languages
Programming Languages · hard · #631

Which programming language is this?

class Base
{
    const LABEL = 'base';
    public function label(): string { return static::LABEL; }
}
class Child extends Base
{
    const LABEL = 'child';
}
echo (new Child()) instanceof Base ? (new Child())->label() : '';

Answer: PHP

Late static binding via static::LABEL, the instanceof operator and ->label() method calls are PHP, not Perl.
Play Programming Languages ▸