Re: [PHP-DEV] Sablotron leaks
RL $xsl = join(, file(x.xsl)); RL RL Blah... I see this a lot. We should probably just relent and make a RL function that reads an entire file into a string. I said this a year ago... Somehow there were counter-argunets on that (I don't remember what they were, but it's still not there). -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Sablotron leaks
sh I'd need to see your test script to give you an answer, that sh repeat count does look nasty (with an FYI that I'm no longer sh maintaining Sablot, as all my development efforts are now sh focused on the XSLT extension..) The script is pretty plain: ? define(TC, 50); $xsl = join(, file(x.xsl)); for($t=0; $t TC; $t++) { $src = join(, file(f)); xslt_process($xsl, $src, $s); $arr = split(\n, $s); $cnt = count($arr); for($i=0;$i $cnt-1; $i+=4) { $ret[] = array( $arr[$i], $arr[$i+1], $arr[$i+2], $arr[$i+3]); } } ? -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Sablotron leaks
$xsl = join(, file(x.xsl)); Blah... I see this a lot. We should probably just relent and make a function that reads an entire file into a string. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Sablotron leaks
Rasmus Lerdorf wrote: Blah... I see this a lot. We should probably just relent and make a function that reads an entire file into a string. +1 :) -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de Meet the PHP Project at LinuxTag, Booth 5.0.334/2 - http://phpinfo.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Sablotron leaks
On Sunday 24 June 2001 18:32, Rasmus Lerdorf wrote: $xsl = join(, file(x.xsl)); Blah... I see this a lot. We should probably just relent and make a function that reads an entire file into a string. Yes please! -- Phil Driscoll -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Sablotron leaks
On Sun, 24 Jun 2001 10:32:06 -0700 (PDT), Rasmus Lerdorf wrote: $xsl = join(, file(x.xsl)); Blah... I see this a lot. We should probably just relent and make a function that reads an entire file into a string. +1 - Martin -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Read a file into a string (RE: [PHP-DEV] Sablotron leaks)
Blah... I see this a lot. We should probably just relent and make a function that reads an entire file into a string. Yes, please do :) Regards, Marten. ps. This has been requested in #5008, #7213 and #8882. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] Read a file into a string (RE: [PHP-DEV] Sablotron leaks)
Doesn't this do that? $FilePointer=fopen($FileLocation,r); $_MyString.=fread($FilePointer,filesize ($FileLocation)); fclose($FilePointer); Althought I guess this could suck memory pretty hard on large files, and you guys want to get away from that... -Brian Blah... I see this a lot. We should probably just relent and make a function that reads an entire file into a string. Yes, please do :) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]