$ ./guess_the_languageProgramming Languages
Programming Languages · medium · #629

Which programming language is this?

trait Timestamps
{
    public function touch(): void { $this->updatedAt = time(); }
}

class Post
{
    use Timestamps;
    public int $updatedAt = 0;
}

Answer: PHP

A trait pulled into a class with use Timestamps; and $this-> property access are PHP.
Play Programming Languages ▸