All pastes #399785 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-03-18 07:56 UTC
rendered paste body
<?php
function get_sections($pap1,$pap2){
	echo "<ul><li>what $pap1 ?? worked $pap2?</li></ul>";
}

$string = "<eed>get_sections(\"val\",5)</eed>";
$getiffunc = substr($string,0,5);
if ($getiffunc = "<eed>"){
	$string = substr($string,5);
	if (strlen($string) > 6){
		$endtag = substr($string,-6,6);
		$thefunc = explode($endtag,$string);
		$funct = trim($thefunc[0]);
		$functarr = explode("(",$funct);
		$funcarray = explode(")",$functarr[1]);
		$param = explode(",",$funcarray[0]);
		print_r($param);
		$definedarr = get_defined_functions();
		if (in_array($funct,$definedarr['user'])){
			call_user_func_array($funct,array($param));
		}else {
			echo "i don't know what to do with ".$funct;
		}
	}else {
		echo "it is empty, how could i run empty value ?";
	}
}else {
	echo $string;
}
?>