<?php
namespace test {
use nonexistent;
class test {
static function run(){
var_dump(nonexistent);
existent;
}
}
}
namespace {
define("test\\existent", "bug!", 1);
test\test::run();
}
Warning: define(): Argument #3 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported in /in/s5lLn on line 15
Fatal error: Uncaught Error: Undefined constant "test\nonexistent" in /in/s5lLn:8
Stack trace:
#0 /in/s5lLn(16): test\test::run()
#1 {main}
thrown in /in/s5lLn on line 8
Process exited with code 255.
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Deprecated: define(): Declaration of case-insensitive constants is deprecated in /in/s5lLn on line 15
Warning: Use of undefined constant nonexistent - assumed 'nonexistent' (this will throw an Error in a future version of PHP) in /in/s5lLn on line 8
string(11) "nonexistent"
Output for 7.2.0 - 7.2.33, 7.3.32 - 7.3.33
Warning: Use of undefined constant nonexistent - assumed 'nonexistent' (this will throw an Error in a future version of PHP) in /in/s5lLn on line 8
string(11) "nonexistent"