1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?php $code="class evalTest{ function f1(){ echo 'f1'; \$this->f2(); } function f2(){ echo 'f2'; } } \$x=new evalTest(); \$x->f2(); \$x->f1();"; eval($code); echo 'test';
1
f2f1f2test