<?php

class TestClass {
	public function test() {
		echo __METHOD__;
	}
}

$test = '$obj->test();';
$obj = new TestClass;
eval($test);