How can I call a PHP function stored as a string from within another PHP function? -
i find myself in situation need call php function stored string php function.
<?php $phpcodestring = "<?php echo 'hello world!' ?>"; echo $phpcodestring; ?>
how can hello world render screen above structure?
back few steps - why need that?
99.9% of time there better way eval()
.
or use create_function()
internally uses eval()
isn't better, when not defining function body directly string literal can sure there , there nothing potentially dangerous.
Comments
Post a Comment