I\'m wondering if it is at all possible to create a stream wrapper in order to load some code from an array into using something like the following
eval, the word, isn't evil. Things you can do with it are. Any means of doing what you want will have the same risk as eval. So just use eval, since securing it is a more 'known' problem.