All pastes #745126 Raw Edit

Anonymous

public php v1 · immutable
·published 2007-10-22 02:18 UTC
rendered paste body
<?phpclass Theorie {	    function __construct() {		$this->strings = array('"', "'");		$this->comments = array("#" => "\n", "//" => "\n", "/*" => "*/");		$this->open_string = 0;		$this->open_comment = 0;		$this->join_text = array();	}		function start($text) {		// break text into words		$text = explode(' ', $text);		$size = count($text);		for($i = 0; $i <= $size; $i++) {			$word = $text[$i];			$this->search($word);		}	}        function search($word) {		foreach($this->comments as $k => $v) {			echo $k;		}	}					}?><form action="#" method="post"><textarea cols="70" rows="7" name="text"></textarea><br /><input type="submit" value="submit" name="submit" /><?phpif(isset($_POST['submit'])) {	$text = $_POST['text'];	$t = new Theorie();	$t->start($text);}