I vote for Notepad++ as well, except for the \r \n highlighting, which is better in WDZ version.
jscript code:
// Some random code posted by matty :p
function ReadFile(File) {
var oLineArray = new Array();
var oFile = FileSys.OpenTextFile(File, 1 /* ForReading */, false);
while (!oFile.AtEndOfStream) oLineArray.push(oFile.ReadLine());
return oLineArray;
}
Notepad++:
php code:
<?php
// Some random code posted by mynetx :p
function post($strUrl, $strQuery) {
$strQuery = utf8_encode($strQuery);
$resFp = fsockopen(REMOTE_HOST, 80);
fwrite($resFp,
'POST '.$strUrl." HTTP/1.1\r\nHost: ".REMOTE_HOST."\r\n".
"Content-Type: application/x-www-form-urlencoded; charset=UTF-8\r\n".
"Cookie: PHPSESSID=".SID."\r\n".
'Content-Length: '.strlen($strQuery)."\r\nConnection: Close\r\n\r\n".$strQuery);
$strReply = '';
while(!feof($resFp))
$strReply .= fread($resFp, 1024);
fclose($resFp);
$intBody = strpos($strReply, "\r\n\r\n");
if(!$intBody)
$intBody = strlen($strReply);
$strHeaders = substr($strReply, 0, $intBody);
$strBody = substr($strReply, $intBody + 4);
if(stristr($strHeaders, 'Transfer-Encoding: chunked')) {
$strBody = decode_chunked($strBody);
}
return $strBody;
}
$strText = <<< SOME_TEST
Breaking News:
WDZ is working on the forums again.
SOME_TEST;
?>
Notepad++:
By the way:
quote:
Originally posted by http://de.php.net/types.string#language.types.string.syntax.heredoc
Also, the identifier must follow the same naming rules as any other label in PHP: it must contain only alphanumeric characters and underscores, and must start with a non-digit character or underscore.