mirror of
https://github.com/php/php-src.git
synced 2025-01-10 13:03:54 +08:00
18 lines
309 B
PHP
18 lines
309 B
PHP
--TEST--
|
|
ReflectionClass::isAnonymous() method
|
|
--FILE--
|
|
<?php
|
|
|
|
class TestClass {}
|
|
|
|
$declaredClass = new ReflectionClass('TestClass');
|
|
$anonymousClass = new ReflectionClass(new class {});
|
|
|
|
var_dump($declaredClass->isAnonymous());
|
|
var_dump($anonymousClass->isAnonymous());
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(false)
|
|
bool(true)
|