Isn't reflection slow as hell?
If not please correct me.
If not please correct me.
echo $FOO[$BAR];
echo $$BAZ;
>>>
push FOO.ptr
push BAR.ptr
call hash_get
push ax
call print
push local_table // static per compiled scope
push BAZ.ptr
call hash_get
push [ax+24] // entry->value
call print
You'd probably want to add error handling (to both cases) and accessing a global variable that didn't exist when the code was compiled will likely be slow, but if becomes a preformance bottleneck you can always rewrite it to something easier to compile.