Possible to define methods within eval or include?
Posted: Mon May 19, 2008 5:58 am
Hi,
Is it possible to define a method of the class from which an 'eval' or 'include' is called within that eval or include? (In php 4.) E.g. I want 'myfunction()' to be a method of 'myclass' in the following:
<?php
class myclass {
function myclass() {
eval("function myfunction() { echo \"TEST\"; }");
}
}
?>
Thanks,
Tom
Is it possible to define a method of the class from which an 'eval' or 'include' is called within that eval or include? (In php 4.) E.g. I want 'myfunction()' to be a method of 'myclass' in the following:
<?php
class myclass {
function myclass() {
eval("function myfunction() { echo \"TEST\"; }");
}
}
?>
Thanks,
Tom