echo
Loading took: 0.0776360034943
Parsing took: 0.665219068527
echo
<html><?php
/** test script for context */
error_reporting(E_ALL);
ini_set('max_execution_time', 500);
// $version changed when major change made
$version = '0.0.2';
require('geshi/geshifunctions.php');
require('class.geshi.php');
require('class.geshicontext.php');
require('class.geshilanguage.php');
require('class.geshistyler.php');
define('DEBUG', false);
define('DEBUG_CONTEXT_PARSER', false);
$geshi = &new GeSHi('', 'php/php4', 'geshi/');
//$geshi->enable_classes(true);
//header('Expires: 0');
// How to set styles???
//$geshi->set_string_style($style);
// becomes
// $geshi->style->notify(GESHI_STYLE_STRING, $style);
//
// when create geshi create a style object that listens
// give style object to root context by reference
// root gives to children by reference
// when notify called
// $style->styles[GESHI_STYLE_STRING] = $style; (GESHI_STYLE_STRING_SINGLE, GESHI_STYLE_STRING_DOUBLE)
// when highlighting
// if $this->style->styles[$this->type]
// then use that
// else use our default
//$language = &new Language ('php_html');?><!DOCTYPE html PUBLIC!>
<html>
<head>
<title>Geshi1.2</title>
<style type="text/css">
<!--
* {line-height: 150%;}
/*span[class], span[style] { background: #ffc; border: 1px dotted blue;}*/
.php { color: #239; }
.default-multi_comment, .default-single_comment, .html-comment {color: #888; }
.default-doc_comment { color: #555; }
.html-tag, .html-css_delimiters, .php-kw1 { font-weight: bold; }
.html-doctype { color: #933; font-weight: bold; }
.php-double_string, .default-single_string, .default-double_string { color: #f00; }
.html-double_string, .html-single_string { color: #933; }
.javascript { color: #990; }
.html-entity { color: #22f; }
.php-sym0 { color: #008000; }
.php-sym1{ color: #44d444; }
.php-kw0 { color: #b1b100; }
.php-kw2 { color: #006; }
.php-regex01, .php-regex02 { color: #33f; }
.php-num { color: #d3d; }
-->
</style>
<script type="text/javascript">
var foo=document.getElementById('');
</script>
</head>
<body onload="javascript:return false;">
<!-- BEGIN foo.bar -->
<br />
<!-- END foo.bar -->
<?php
echo '<pre>';
/*$source = '<html><head><title>
<?php echo $title . " :: " . $subtitle ?>
<link rel="foo" href="bar" />
<script type="text/javascript">//<!--
window.alert("Hi!!!");
//--></script>
</title>';*/
//$source = file_get_contents('old/geshi/geshi.php');
//$source = substr(file_get_contents('index.php'),1010);
$source = file_get_contents('index.php');
//$source = file_get_contents('tests/phpdoc.php');
//$source = file_get_contents('tests/misc.php');
//$source = substr(file_get_contents('tests/Converter.inc'),0,40000);
//$source = file_get_contents('tests/Converter.inc');
//$source = file_get_contents('tests/Classes.inc');
/*$source = '<?php $ini = parse_ini_file($_phpDocumenter_path . FILE_SEPARATOR . \'phpDocumenter.ini\', true); ?>';*/
/*$source = '<?php // find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir]
$ini = phpDocumentor_parse_ini_file($_phpDocumentor_install_dir . PATH_DELIMITER . \'phpDocumentor.ini\', true); ?>';*/
$foo = '\\ \n \\ \' \\';
$foo = $foo;
/*$source = '<?php
// echo ""; ?>
</html>';*/
/*$source = '<?php
// a comment
echo "hi";
?>';*/
//$source = '<html onload="javascript:do_this();">';
/*$source = '<blar>
<?php
echo "hi";
?>
<script type="text/javascript">var foo;</script>
<html>
<foo onload="javascript:dsoij();">
<script type="text/javascript"></script>';*/
//$source = ' <html class="foo" style="javascript:set_Style();"> ';
$geshi->_source = $source;
$start = microtime();
$code = $geshi->parse_code();
$end = microtime();
echo "$code\n\n";
$parts = explode(' ', $start);
$parts2 = explode(' ', $end);
$time = ($parts2[1]+$parts2[0]-$parts[1]-$parts[0]);
echo "Time: " . $time;
/*$fh = fopen('times.txt', 'a');
fwrite($fh, $version . ' ' . $time . "\n");
fclose($fh);*/
//echo '<br /><br /><pre>';
//echo htmlspecialchars(print_r($language, true));
//echo '</pre>';
echo;
exit;
$ini = parse_ini_file('foo.bar');
?>
Time: 0.743099962875