Re: PHP 4.0 Bug #3779 Updated: Crash in syntax hilighter

From: Date: Thu, 09 Mar 2000 13:06:12 +0000
Subject: Re: PHP 4.0 Bug #3779 Updated: Crash in syntax hilighter
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-16573@lists.php.net to get a copy of this message
On Thu, 9 Mar 2000, Faisal Nasim wrote: > <cut> > > > Here is the minimal script that causes crash: > > > > <? > > $code = <<<END > > Directory="<?=$Dir;?>" > > END; > > highlight_string($code); > > ?> > > Output on my system: > > <code><font color="#000000"> > <br>Directory="<font color="#0000BB">&lt;?=</font><font > color="#007700">;</font> > <br></font>="#0000BB">?&gt;</font>" > </code> > > > Note: If I am not mistaking, you are a Zend > internals guy... we would expect a fix for > a bug as well! ;) (Oh, I know that PHP is not > Zend, but it seems to be a Zend error) > > Zend Guys, is there any possibility to rewrite > the Zend engine in C++? It will make it alot > cleaner and possibly with less bugs (and perhaps > with more speed as well)! Perhaps with more speeed is a seriously over-optimistic statement, Switching to C++ will almost definitely reduce the performance very very significantly (I can't say for sure, but it'll probably be in the range of 10's of %s). Also, C++ is much less portable than C, so we're not interested in switching languages. In many ways, the design of Zend tries to be OO-style, without being implemented in an OO language, so many of the benefits of C++, mostly those that affect the way you design your application, are already benefiting the engine. Finally, I don't know what exactly the bug you reported is about, but I have a feeling it wouldn't have helped us if the engine was C++ish... In C++ you still have to write bug-free code in order for it to work :) Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/

« previous php.dev (#16573) next »