3v4l.org

run code in 200+ PHP versions simultaneously
<?php $var = "testing"; putenv('xxx=$var'); class A { const X = $_ENV['xxx'] ?? 'aaa'; } echo A::X;
Output for 7.2.0 - 7.4.4
Fatal error: Constant expression contains invalid operations in /in/OTkuL on line 8
Process exited with code 255.