xref: /PHP-8.1/Zend/tests/bug81631.phpt (revision 4d4fe763)
1--TEST--
2Bug #81631: ::class with dynamic class name may yield wrong line number
3--FILE--
4<?php
5$a = 0;
6var_dump($b::class);
7?>
8--EXPECTF--
9Warning: Undefined variable $b in %s on line 3
10
11Fatal error: Uncaught TypeError: Cannot use "::class" on value of type null in %s:3
12Stack trace:
13#0 {main}
14  thrown in %s on line 3
15