1--TEST--
2Cannot access self::class when no class scope is active
3--FILE--
4<?php
5
6try {
7    var_dump(self::class);
8} catch (Error $e) {
9    echo $e->getMessage(), "\n";
10}
11try {
12    var_dump([self::class]);
13} catch (Error $e) {
14    echo $e->getMessage(), "\n";
15}
16
17?>
18--EXPECT--
19Cannot use "self" when no class scope is active
20Cannot use "self" when no class scope is active
21