wiki/content/20201110102900-php_class_name_literal.md

344 B

id title
e344631b-61fc-4110-abab-e610ce460854 PHP Class Name Literal

Description

Introduced in PHP 8.0, class name literals1 is a new alternative to get_class()

Syntax

$foo = new Foo();
var_dump($foo:class)

Footnotes