3v4l.org

run code in 200+ PHP versions simultaneously
<?php define('FOO', bin2hex(random_bytes(32))); class Bar { const BAZ = FOO; } class Qux extends Bar { const BAZ = 'lol'; } var_dump(Qux::BAZ);
based on KJkmQ