phpjs
Version:
1,085 lines (955 loc) • 4.5 MB
text/xml
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dsq="http://www.disqus.com/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.0/"
>
<channel>
<item>
<!-- title of article -->
<title>abs</title>
<!-- absolute URI to article -->
<link>http://phpjs.org/functions/abs</link>
<!-- thread body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<content:encoded><![CDATA[Return the absolute value of the number ]]></content:encoded>
<!-- value used within disqus_identifier; usually internal identifier of article -->
<dsq:thread_identifier>300</dsq:thread_identifier>
<!-- creation date of thread (article), in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:post_date_gmt>2009-02-10 14:42:48</wp:post_date_gmt>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>670</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Karol Kowalski]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>195.224.160.13</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-30 11:03:04</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[Why not use native JS Math.abs for this. I believe this should be faster than conditional expressions.
<pre><code>
function abs( mixed_number ) {
// http://kevin.vanzonneveld.net
// + original by: _argos
// * example 1: abs(4.2);
// * returns 1: 4.2
// * example 2: abs(-4.2);
// * returns 2: 4.2
// * example 3: abs(-5);
// * returns 3: 5
// * example 4: abs('_argos');
// * returns 4: 0
var abs=Math.abs( mixed_number )
return ( !isNaN ( abs) ) ? abs : 0
}
</code></pre>]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>671</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>87.233.232.233</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-30 12:48:35</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ Karol Kowalski: Using native Javascript for this is probably best so I've updated the function. But I'm not totally certain that this is faster. Doesn't the Math libary have to be loaded or something? Can somebod shed a light on this?
For reference, this was the original by _argos:
<pre><code>
function abs( mixed_number ) {
// + original by: _argos
return ( ( !isNaN ( mixed_number ) ) ? ( ( mixed_number < 0 ) ? ( mixed_number * -1 ) : mixed_number ) : 0 );
}
</code></pre>]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>672</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Karol Kowalski]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>195.224.160.13</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-30 15:03:31</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[I run a test and it appeared that my function with Math.abs was around 40% more time consuming than yours. I tried to optimize it and ended up with 20% gain, and the code is still smaller and more readable. I tested it in Firefox, IE7, Safari and Opera with similar results. To see what's causing the overhead I run a function that would just return Math.abs, withoud checking for validity, still it was 10% slower than your function. It seems that Math.abs API is always slower than what can be accomplished with JS hack, a bit sad.
Still, for code readability I would sugget using the code of abs_math2.
Here's the test code:
<pre><code>
if (!window['console']) {
console={}
console.log=alert
}
var start;
function abs_math2 ( mixed_number ) {
return ( ( isNaN ( mixed_number ) ) ? 0 : Math.abs ( mixed_number ) );
}
function abs_math( mixed_number ) {
var abs=Math.abs( mixed_number );
return ( !isNaN ( abs ) ) ? abs : 0
}
function abs_cond( mixed_number ) {
return ( ( !isNaN ( mixed_number ) ) ? ( ( mixed_number < 0 ) ? ( mixed_number * -1 ) : mixed_number ) : 0 );
}
start=new Date();
for (var i=100000;i;i--) {
abs_cond(4.2);
abs_cond(-4.2);
abs_cond(-5);
abs_cond('_argos');
abs_cond(-Infinity);
}
console.log((new Date())-start)
start=new Date();
for (var i=100000;i;i--) {
abs_math(4.2);
abs_math(-4.2);
abs_math(-5);
abs_math('_argos');
abs_math(-Infinity);
}
console.log((new Date())-start)
start=new Date();
for (var i=100000;i;i--) {
abs_math2(4.2);
abs_math2(-4.2);
abs_math2(-5);
abs_math2('_argos');
abs_math2(-Infinity);
}
console.log((new Date())-start)
//my results
//Firefox 2.0.11
//1000
//1422
//1219
</code></pre>]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>673</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>87.233.232.233</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-30 15:43:39</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ Karol Kowalski: Awesome work Karol! I've updated the function. Thanks for putting in the extra effort. Greatly appreciated!]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>674</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[_argos]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>201.230.40.192</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-30 22:24:48</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@Karol Kowalski : Hi, thanks for take the time to check my port, I make the same tests like you, because I think that native functions always are more slower, so ever I use self hacks :p again thanxs for your time.
PS: Sorry for my badly English, but i have 4 years without use it :p]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>675</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[_argos]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>201.230.40.192</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-31 17:33:29</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[Hi Kevin I'm here again look this ports.
<pre><code>
if ( defined ( 'CONSTANTE' ) ) {
console.log ( CONSTANTE );
}
function defined ( constant_name ) {
return ( ( window [ constant_name ] !== undefined ) ? true : false );
}
// -----
// [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
console.log ( range ( 0, 12 ) );
// [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
console.log ( range( 0, 100, 10 ) );
// ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'];
console.log ( range( 'a', 'i' ) );
// ['c', 'b', 'a'];
console.log ( range ('c', 'a' ) );
function range ( low, high, step ) {
var matrix = [];
var inival, endval, plus;
var walker = step || 1;
var chars = false;
if ( !isNaN ( low ) && !isNaN ( high ) ) {
inival = low;
endval = high;
} else if ( isNaN ( low ) && isNaN ( high ) ) {
chars = true;
inival = low.charCodeAt ( 0 );
endval = high.charCodeAt ( 0 );
} else {
inival = ( isNaN ( low ) ? 0 : low );
endval = ( isNaN ( high ) ? 0 : high );
}
plus = ( ( inival > endval ) ? false : true );
if ( plus ) {
while ( inival <= endval ) {
matrix.push ( ( ( chars ) ? String.fromCharCode ( inival ) : inival ) );
inival += walker;
}
} else {
while ( inival >= endval ) {
matrix.push ( ( ( chars ) ? String.fromCharCode ( inival ) : inival ) );
inival -= walker;
}
}
return matrix;
}
// -----
console.log ( strcmp ( 'waldo', 'Waldo' ) );
console.log ( strcmp ( 'Waldo', 'waldo' ) );
console.log ( strcmp ( 'waldo', 'waldo' ) );
function strcmp ( str1, str2 ) {
var size1 = str1.charCodeAt ( 0 );
var size2 = str2.charCodeAt ( 0 );
return ( ( size1 == size2 ) ? 0 : ( ( size1 > size2 ) ? 1 : -1 ) );
}
</code></pre>]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>676</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>84.245.21.254</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-31 18:47:22</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ _argos: Nice work! Added!]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>677</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Philip]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>65.40.21.13</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-03-31 19:42:37</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[Dunno where this belongs, but how about this code for echo()?
<pre><code>
function echo()
{
for(i=0;i<echo.arguments.length;i++)
{
if(document.body && document.body.innerHTML) {
document.body.innerHTML=document.body.innerHTML+echo.arguments[i];
} else {
document.write(echo.arguments[i]);
}
}
}
</code></pre>]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>678</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>87.233.232.233</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-04-02 13:26:06</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[Philip: Good idea, I'll add it, thanks!]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>679</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Jonas Raoni]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>201.95.110.61</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-04-12 17:33:32</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[A shorter version of this would be:
return Math.abs (n) || 0;]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>680</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Philip]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>65.40.20.11</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-04-12 20:24:25</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[Hey, just fyi... Philip and Philip Peterson are both me ;-)]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>681</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>84.245.21.254</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-04-13 12:29:58</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ Jonas Raoni: Thanks I'll update the function.
@ Philip: I'll update your name!]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>682</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Reena]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>reenazeenath@gmail.com</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>nill</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>125.22.245.36</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-09-08 11:40:18</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[Good]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>683</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Nile]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>jeremyfifty9@gmail.com</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>unlinkthis.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>67.173.9.41</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2009-01-09 21:34:02</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[json_encode
<pre><code>
var arr = new Array('Hello');
var applyEncode = function(varIn){
return '{'+varIn+'}';
}
var json_encode = function(value){
var data = '';
for(i=0,endCount='';i<value.length;++i){
var endCount = (i!=value.length-1) ? ", " : "";
data += '"'+key(value[i])+'" : "'+value[key(value)]+'"'+endCount;
}
return applyEncode(data);
}
document.write(json_encode(arr));
</code></pre>]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>684</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>212.182.167.154</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2009-01-12 23:53:13</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ Nile: Hey Nile thanks for your contribution. Unfortunately there are a couple of issues with it:
- depends on an outside function: applyEncode
- does not support associative arrays (in terms of traversing)
- does not support index arrays, numbers, etc (in terms of encoding)
Please have a look here:
http://www.json.org/json2.js
The code is public domain, so maybe it's possible to modify it and use it in PHP.JS. We could look into that!]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>685</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Paul]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>ksadya@hotmail.com</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>24.94.83.179</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2009-01-15 02:28:06</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[I downloaded php.namespaced.*.js at 2009-01-14 15:28 HST. There appears to be a space missing which is causing javascript errors. Search string "functionPropagation". I was able to resolve the error in php.namespaced.js and php.namespaced.min.js, but not php.namespaced.packed.js due to the packing operation.
BTW: This package is incredible!]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>686</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>212.182.167.154</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2009-01-15 11:40:52</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ Paul: It was actually an issue in the exit function. Should be fixed now, thanks for letting us know!]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>687</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Jay]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>jay@myd3.com</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>72.24.103.178</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2009-03-06 17:02:58</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[You should really consider putting this project up on GitHub.com, it would be a perfect fit. That way people could modify and improve the code, and then send you a pull request for you to merge their changes. It's a very nice way to develop open source projects.]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>1371</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>87.233.232.233</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2009-03-22 19:06:57</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ Jay: I'm working on 1 github project and a.t.m. I do not find the speed satisfying. I imagine all that SSH traffic causes quite some load but git pull times of > 60 seconds are just not acceptable. Maybe later though! Thanks]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>93729</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>212.182.167.154</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2009-09-04 19:14:48</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ Jay: "Later" has arrived. We're now on GitHub!
http://github.com/kvz/phpjs
Some more info about the change here:
http://kevin.vanzonneveld.net/techblog/article/svn_to_git/]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>160792</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[????? ???]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>abodyalexgarage@yahoo.com</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://an3m1.com/</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>41.196.102.241</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2012-04-10 09:49:50</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[I have a lot to benefit from this article and thank you for this wonderful effort to this article and will continue my many articles you have other ]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
</item>
<item>
<!-- title of article -->
<title>acos</title>
<!-- absolute URI to article -->
<link>http://phpjs.org/functions/acos</link>
<!-- thread body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<content:encoded><![CDATA[Return the arc cosine of the number in radians ]]></content:encoded>
<!-- value used within disqus_identifier; usually internal identifier of article -->
<dsq:thread_identifier>301</dsq:thread_identifier>
<!-- creation date of thread (article), in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:post_date_gmt>2009-02-10 14:42:48</wp:post_date_gmt>
</item>
<item>
<!-- title of article -->
<title>acosh</title>
<!-- absolute URI to article -->
<link>http://phpjs.org/functions/acosh</link>
<!-- thread body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<content:encoded><![CDATA[Returns the inverse hyperbolic cosine of the number, i.e. the value whose hyperbolic cosine is number ]]></content:encoded>
<!-- value used within disqus_identifier; usually internal identifier of article -->
<dsq:thread_identifier>302</dsq:thread_identifier>
<!-- creation date of thread (article), in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:post_date_gmt>2009-02-10 14:42:48</wp:post_date_gmt>
</item>
<item>
<!-- title of article -->
<title>addslashes</title>
<!-- absolute URI to article -->
<link>http://phpjs.org/functions/addslashes</link>
<!-- thread body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<content:encoded><![CDATA[Escapes single quote, double quotes and backslash characters in a string with backslashes ]]></content:encoded>
<!-- value used within disqus_identifier; usually internal identifier of article -->
<dsq:thread_identifier>303</dsq:thread_identifier>
<!-- creation date of thread (article), in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:post_date_gmt>2009-02-10 14:42:48</wp:post_date_gmt>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>197</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[booeyOH]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>65.105.189.146</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-21 18:35:41</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[preg_quote() function for adding slashes to RegEx
Not sure if it is out there, but needed something quick, hope its helpful
<pre><code>
function preg_quote( str ) {
var quote_chars = ["\", ".", "+", "*", "?", "[", "^", "]", "$", "(", ")", "{", "}", "=", "!", "<", ">", "|", ":"];
var return_val = str;
for(var i=0;i<quote_chars.length;i++)
{
eval("var pattern = /\"+quote_chars[i]+"/gi");
return_val = return_val.replace(pattern, chr(92)+quote_chars[i]);
}
return return_val;
}
</code></pre>]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>198</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>84.245.21.254</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-22 07:40:04</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ booeyOH: It sure is! Thank you!]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>199</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Ates Goral]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>209.205.16.132</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-23 18:14:03</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[First, just a nitpick:
A set of characters can be used instead of the ORs:
<pre><code>
return str.replace(/(["'\])/g, "\$1");
</code></pre>
To add support for NUL:
<pre><code>
return str.replace(/(["'\])/g, "\$1").replace(//g, "\0");
</code></pre>]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>200</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Ates Goral]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>209.205.16.132</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-23 18:18:10</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[Additional test case:
<pre><code>
// * example 2: addslashes(""'\");
// * returns 2: "\"\'\\\"
</code></pre>]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>201</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>84.245.21.254</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-01-23 20:24:09</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ Ates Goral: Processed.]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>202</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Martin]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>209.240.75.80</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-02-27 23:47:40</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[example 1 (the only one) on this page is incorrect, in that it doesn't actually add the slash. hehe.]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>203</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>84.245.21.254</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-02-28 12:58:55</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ Martin: Thanks for noticing. If you look at the source code, you see that the example is correct. But my blog probably filters out the backslash again. I'll look into it!]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>204</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>84.245.21.254</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-03-01 17:02:17</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ Martin: Fixed!]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>205</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Jonas Raoni]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>201.95.110.61</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-04-12 17:48:16</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[It's missing the "" escape.
return str.replace(/(["'\])/g, "\$1").replace(//g, "\0");
Or
return str.replace(/(["'\])/g, function(_, n){
return "\" + (n == "" ? "0" : n);
});]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>206</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Kevin van Zonneveld]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email>kevin@vanzonneveld.net</wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url>http://kevin.vanzonneveld.net</wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>84.245.21.254</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-04-13 12:34:05</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[@ Jonas Raoni: I believe your proposal has the same regex, only here it's singlequoted for compatbility with Dean Edwards packer.]]></wp:comment_content>
<!-- is this comment approved? 0/1 -->
<wp:comment_approved>1</wp:comment_approved>
<!-- parent id (match up with wp:comment_id) -->
<wp:comment_parent>0</wp:comment_parent>
</wp:comment>
<!-- open/closed values are acceptable -->
<wp:comment_status>open</wp:comment_status>
<wp:comment>
<!-- internal id of comment -->
<wp:comment_id>207</wp:comment_id>
<!-- author display name -->
<wp:comment_author><![CDATA[Sean Gallagher]]></wp:comment_author>
<!-- author email address -->
<wp:comment_author_email></wp:comment_author_email>
<!-- author url, optional -->
<wp:comment_author_url></wp:comment_author_url>
<!-- author ip address -->
<wp:comment_author_IP>24.239.202.123</wp:comment_author_IP>
<!-- comment datetime, in GMT. Must be YYYY-MM-DD HH:MM:SS 24-hour format. -->
<wp:comment_date_gmt>2008-05-24 01:03:58</wp:comment_date_gmt>
<!-- comment body; use cdata; html allowed (though will be formatted to DISQUS specs) -->
<wp:comment_content><![CDATA[Here is another quicky but good add slashes function!
P.S. I could not get your f