Hi, if it looks, smells, and works like a class constant, can't just BE a class constant, automatically created, but just as-if "const class = 'xxx';" had been present in the definition in the first place?
Not that I know php code internals in any thorough way, but I imagine that that approach would obviate the need for any new opcodes. best regards Patrick