PHP7.0以降では PHP4形式のコンストラクタが非推奨となっているため
htmltemplateクラスとStandardParserクラスのコンストラクタを __constract に変える必要があります。
変更前のソースコード
/*
* StandardParser
* parser defined with above tags.
* behave as previous htmltemplate
*/
class StandardParser extends TemplateParser{
function StandardParser(){
$this->add(new tag_val())->add(new tag_rval())->add(new tag_def())->add(new tag_each());
}
}
/*
* htmltemplate
* the APIs defined after the manner of htmltemplate for PHP4
* tmp file generation has not been implemented yet.(2003-07-08)
*/
class htmltemplate{
private $parser;
static private $instance;
private function htmltemplate(){
$this->parser=new StandardParser();
}
/*
* StandardParser
* parser defined with above tags.
* behave as previous htmltemplate
*/
class StandardParser extends TemplateParser{
function __constract(){
$this->add(new tag_val())->add(new tag_rval())->add(new tag_def())->add(new tag_each());
}
}
/*
* htmltemplate
* the APIs defined after the manner of htmltemplate for PHP4
* tmp file generation has not been implemented yet.(2003-07-08)
*/
class htmltemplate{
private $parser;
static private $instance;
private function __constract(){
$this->parser=new StandardParser();
}