bcompiler_write_class

(PECL bcompiler >= 0.4)

bcompiler_write_class写锟诫定锟斤拷锟斤拷锟斤拷锟斤拷锟街斤拷锟斤拷

说锟斤拷

bcompiler_write_class ( resource $filehandle , string $className [, string $extends ] ) : bool

锟斤拷 PHP 锟斤拷取锟窖达拷锟节碉拷锟斤拷锟斤拷纸锟斤拷耄拷锟斤拷锟斤拷锟斤拷锟叫达拷锟津开碉拷锟侥硷拷锟斤拷锟斤拷小锟�

锟斤拷锟斤拷

filehandle

fopen() 锟斤拷锟截碉拷锟侥硷拷锟斤拷锟斤拷锟�

className

锟街凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷

extends

锟斤拷锟斤拷值

锟缴癸拷时锟斤拷锟斤拷 TRUE锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE锟斤拷

锟斤拷锟斤拷

Example #1 bcompiler_write_class() 锟斤拷锟斤拷

<?php
$fh 
fopen("/tmp/example","w");
bcompiler_write_header($fh);
bcompiler_write_class($fh,"DB");
// 锟斤拷锟斤拷锟斤拷锟斤拷锟� DB_mysql 写锟斤拷 DB_common锟斤拷锟斤拷为DB_mysql extends DB_common锟斤拷
bcompiler_write_class($fh,"DB_common");
bcompiler_write_class($fh,"DB_mysql");
bcompiler_write_footer($fh);
fclose($fh);

?>

注锟斤拷

Warning

锟剿猴拷锟斤拷锟斤拷实锟斤拷锟斤拷锟侥★拷锟剿猴拷锟斤拷锟侥憋拷锟襟,帮拷锟斤拷锟斤拷锟狡硷拷锟斤拷锟斤拷锟斤拷牡锟斤拷锟斤拷锟斤拷锟斤拷锟轿达拷锟斤拷锟� PHP 锟斤拷锟斤拷锟芥本锟斤拷未通知锟酵憋拷锟睫改★拷使锟矫憋拷锟斤拷锟斤拷锟斤拷锟斤拷锟皆碉拷 锟斤拷

Note:

锟矫猴拷锟斤拷锟斤拷锟斤拷执锟斤拷锟斤拷锟斤拷锟斤拷椋拷锟斤拷锟饺凤拷锟斤拷锟叫达拷锟斤拷锟斤拷顺锟津,凤拷止锟节硷拷锟截碉拷时锟斤拷锟斤拷 undefined class 锟斤拷锟斤拷

锟轿硷拷