PHP 7.2.0 Release Candidate 2 Released

json_encode

(PHP 5 >= 5.2.0, PECL json >= 1.2.0, PHP 7)

json_encodeRetourne la représentation JSON d'une valeur

Description

string json_encode ( mixed $value [, int $options = 0 [, int $depth = 512 ]] )

Retourne une chaîne contenant la représentation JSON de la valeur value.

Liste de paramètres

value

La valeur à encoder. Peut être de n'importe quel type, excepté une ressource.

Toutes les chaînes doivent être encodées UTF-8.

Note:

PHP implémente un sur-ensemble de JSON tel que spécifié dans la » RFC 7159 originale.

options

Masque composé des constantes JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT, JSON_PRESERVE_ZERO_FRACTION, JSON_UNESCAPED_UNICODE. Le comportement de ces constantes est décrit sur la page des constantes JSON.

depth

Définit la profondeur maximale. Doit être supérieur à zéro.

Valeurs de retour

Retourne une chaîne encodé JSON ou FALSE si une erreur survient.

Historique

Version Description
5.6.6 Ajout de la constante JSON_PRESERVE_ZERO_FRACTION pour le paramètre option.
5.5.0 Ajout du paramètre depth.
5.4.0 Les options JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES et JSON_UNESCAPED_UNICODE ont été ajoutées.
5.3.3 L'option JSON_NUMERIC_CHECK a été ajoutée.
5.3.0 Le paramètre options a été ajouté.

Exemples

Exemple #1 Exemple avec json_encode()

<?php
$arr 
= array('a' => 1'b' => 2'c' => 3'd' => 4'e' => 5);

echo 
json_encode($arr);
?>

L'exemple ci-dessus va afficher :

{"a":1,"b":2,"c":3,"d":4,"e":5}

Exemple #2 Exemple avec json_encode() montrant quelques options en action

<?php
$a 
= array('<foo>',"'bar'",'"baz"','&blong&'"\xc3\xa9");

echo 
"Normal : ",  json_encode($a), "\n";
echo 
"Tags : ",    json_encode($aJSON_HEX_TAG), "\n";
echo 
"Apos : ",    json_encode($aJSON_HEX_APOS), "\n";
echo 
"Quot : ",    json_encode($aJSON_HEX_QUOT), "\n";
echo 
"Amp : ",     json_encode($aJSON_HEX_AMP), "\n";
echo 
"Unicode : "json_encode($aJSON_UNESCAPED_UNICODE), "\n";
echo 
"Toutes : ",     json_encode($aJSON_HEX_TAG JSON_HEX_APOS JSON_HEX_QUOT JSON_HEX_AMP JSON_UNESCAPED_UNICODE), "\n\n";

$b = array();

echo 
"Tableau vide sous forme de tableau : "json_encode($b), "\n";
echo 
"Tableau vide sous forme d'objet : "json_encode($bJSON_FORCE_OBJECT), "\n\n";

$c = array(array(1,2,3));

echo 
"Tableau non-associatif sous forme de tableau : "json_encode($c), "\n";
echo 
"Tableau non-associatif sous forme d'objet : "json_encode($cJSON_FORCE_OBJECT), "\n\n";


$d = array('foo' => 'bar''baz' => 'long');

echo 
"Tableau associatif affiché comme objet: "json_encode($d), "\n";
echo 
"Tableau associatif affiché comme objet: "json_encode($dJSON_FORCE_OBJECT), "\n\n";
?>

L'exemple ci-dessus va afficher :

Normal : ["<foo>","'bar'","\"baz\"","&blong&","\u00e9"]
Tags : ["\u003Cfoo\u003E","'bar'","\"baz\"","&blong&","\u00e9"]
Apos : ["<foo>","\u0027bar\u0027","\"baz\"","&blong&","\u00e9"]
Quot : ["<foo>","'bar'","\u0022baz\u0022","&blong&","\u00e9"]
Amp : ["<foo>","'bar'","\"baz\"","\u0026blong\u0026","\u00e9"]
Unicode : ["<foo>","'bar'","\"baz\"","&blong&","é"]
Toutes : ["\u003Cfoo\u003E","\u0027bar\u0027","\u0022baz\u0022","\u0026blong\u0026","é"]

Tableau vide sous forme de tableau : []
Tableau vide sous forme d'objet : {}

Tableau non-associatif sous forme de tableau : [[1,2,3]]
Tableau non-associatif sous forme d'objet : {"0":{"0":1,"1":2,"2":3}}

Tableau associatif affiché comme objet: {"foo":"bar","baz":"long"}
Tableau associatif affiché comme objet: {"foo":"bar","baz":"long"}

Exemple #3 Exemple avec l'option JSON_NUMERIC_CHECK

<?php
echo "Les chaînes représentant des nombres sont automatiquement converties en nombres".PHP_EOL;
$numbers = array('+123123''-123123''1.2e3''0.00001');
var_dump(
 
$numbers,
 
json_encode($numbersJSON_NUMERIC_CHECK)
);
echo 
"Chaînes contenant des nombres non formattés proprement".PHP_EOL;
$strings = array('+a33123456789''a123');
var_dump(
 
$strings,
 
json_encode($stringsJSON_NUMERIC_CHECK)
);
?>

L'exemple ci-dessus va afficher :

Les chaînes représentant des nombres sont automatiquement converties en nombres
array(4) {
  [0]=>
  string(7) "+123123"
  [1]=>
  string(7) "-123123"
  [2]=>
  string(5) "1.2e3"
  [3]=>
  string(7) "0.00001"
}
string(28) "[123123,-123123,1200,1.0e-5]"
Chaînes contenant des nombres non formattés proprement
array(2) {
  [0]=>
  string(13) "+a33123456789"
  [1]=>
  string(4) "a123"
}
string(24) "["+a33123456789","a123"]"

Exemple #4 Exemple avec un tableau séquentiel et un tableau non-séquentiel

<?php
echo "Tableau séquentiel".PHP_EOL;
$sequential = array("foo""bar""baz""blong");
var_dump(
 
$sequential,
 
json_encode($sequential)
);

echo 
PHP_EOL."Tableau non-séquentiel".PHP_EOL;
$nonsequential = array(1=>"foo"2=>"bar"3=>"baz"4=>"blong");
var_dump(
 
$nonsequential,
 
json_encode($nonsequential)
);

echo 
PHP_EOL."Tableau séquentiel avec une clé supprimée".PHP_EOL;
unset(
$sequential[1]);
var_dump(
 
$sequential,
 
json_encode($sequential)
);
?>

L'exemple ci-dessus va afficher :

Tableau séquentiel
array(4) {
  [0]=>
  string(3) "foo"
  [1]=>
  string(3) "bar"
  [2]=>
  string(3) "baz"
  [3]=>
  string(5) "blong"
}
string(27) "["foo","bar","baz","blong"]"

Tableau non-séquentiel
array(4) {
  [1]=>
  string(3) "foo"
  [2]=>
  string(3) "bar"
  [3]=>
  string(3) "baz"
  [4]=>
  string(5) "blong"
}
string(43) "{"1":"foo","2":"bar","3":"baz","4":"blong"}"

Tableau séquentiel avec une clé supprimée
array(3) {
  [0]=>
  string(3) "foo"
  [2]=>
  string(3) "baz"
  [3]=>
  string(5) "blong"
}
string(33) "{"0":"foo","2":"baz","3":"blong"}"

Exemple #5 Exemple avec l'option JSON_PRESERVE_ZERO_FRACTION

<?php
var_dump
(json_encode(12.0JSON_PRESERVE_ZERO_FRACTION));
var_dump(json_encode(12.0));
?>

L'exemple ci-dessus va afficher :

string(4) "12.0"
string(2) "12"

Notes

Note:

Lorsqu'une erreur survient lors de l'encodage, la fonction json_last_error() peut être utilisée pour déterminer la nature exacte de l'erreur.

Note:

Lors de l'encodage d'un tableau, si les clés ne sont pas sous la forme d'une séquence numérique continue commençant à 0, toutes les clés seront encodées sous forme de chaînes de caractères, et spécifiées explicitement pour chaque paire clé-valeur.

Note:

Tout comme l'encodeur JSON de référence, la fonction json_encode() génèrera un JSON qui est une valeur simple (ni un objet, ni un tableau) si une chaîne de caractère, un entier, un nombre à virgule flottante, ou un booléen est fourni en entrée pour le paramètre value. Bien que certains décodeurs acceptent ces valeurs comme JSON valide, d'autres ne les acceptent pas, sachant que la spécification est ambiguë sur ce point.

Pour résumer, testez toujours que votre décodeur JSON peut gérer la sortie que vous générez depuis la fonction json_encode().

Voir aussi

add a note add a note

User Contributed Notes 64 notes

up
59
bohwaz
5 years ago
Are you sure you want to use JSON_NUMERIC_CHECK, really really sure?

Just watch this usecase:

<?php
// International phone number
json_encode(array('phone_number' => '+33123456789'), JSON_NUMERIC_CHECK);
?>

And then you get this JSON:

{"phone_number":33123456789}

Maybe it makes sense for PHP (as is_numeric('+33123456789') returns true), but really, casting it as an int?!

So be careful when using JSON_NUMERIC_CHECK, it may mess up with your data!
up
23
ravenswd at gmail dot com
1 year ago
This isn't mentioned in the documentation for either PHP or jQuery, but if you're passing JSON data to a javascript program, make sure your program begins with:

<?php
header
('Content-Type: application/json');
?>
up
28
guilhenfsu at gmail dot com
4 years ago
Solution for UTF-8 Special Chars.

<?

$array
= array('nome'=>'Paição','cidade'=>'São Paulo');

$array = array_map('htmlentities',$array);

//encode
$json = html_entity_decode(json_encode($array));

//Output: {"nome":"Paição","cidade":"São Paulo"}
echo $json;

?>
up
10
boukeversteegh at gmail dot com
6 years ago
For users of php 5.1.6 or lower, a native json_encode function. This version handles objects, and makes proper distinction between [lists] and {associative arrays}, mixed arrays work as well. It can handle newlines and quotes in both keys and data.

This function will convert non-ascii symbols to "\uXXXX" format as does json_encode.

Besides that, it outputs exactly the same string as json_encode. Including UTF-8 encoded 2-, 3- and 4-byte characters. It is a bit faster than PEAR/JSON::encode, but still slow compared to php 5.3's json_encode. It encodes any variable type exactly as the original.

Relative speeds:
PHP json_encode: 1x
__json_encode: 31x
PEAR/JSON: 46x

NOTE: I assume the input will be valid UTF-8. I don't know what happens if your data contains illegal Unicode sequences. I tried to make the code fast and compact.

<?php
function __json_encode( $data ) {           
    if(
is_array($data) || is_object($data) ) {
       
$islist = is_array($data) && ( empty($data) || array_keys($data) === range(0,count($data)-1) );
       
        if(
$islist ) {
           
$json = '[' . implode(',', array_map('__json_encode', $data) ) . ']';
        } else {
           
$items = Array();
            foreach(
$data as $key => $value ) {
               
$items[] = __json_encode("$key") . ':' . __json_encode($value);
            }
           
$json = '{' . implode(',', $items) . '}';
        }
    } elseif(
is_string($data) ) {
       
# Escape non-printable or Non-ASCII characters.
        # I also put the \\ character first, as suggested in comments on the 'addclashes' page.
       
$string = '"' . addcslashes($data, "\\\"\n\r\t/" . chr(8) . chr(12)) . '"';
       
$json    = '';
       
$len    = strlen($string);
       
# Convert UTF-8 to Hexadecimal Codepoints.
       
for( $i = 0; $i < $len; $i++ ) {
           
           
$char = $string[$i];
           
$c1 = ord($char);
           
           
# Single byte;
           
if( $c1 <128 ) {
               
$json .= ($c1 > 31) ? $char : sprintf("\\u%04x", $c1);
                continue;
            }
           
           
# Double byte
           
$c2 = ord($string[++$i]);
            if ( (
$c1 & 32) === 0 ) {
               
$json .= sprintf("\\u%04x", ($c1 - 192) * 64 + $c2 - 128);
                continue;
            }
           
           
# Triple
           
$c3 = ord($string[++$i]);
            if( (
$c1 & 16) === 0 ) {
               
$json .= sprintf("\\u%04x", (($c1 - 224) <<12) + (($c2 - 128) << 6) + ($c3 - 128));
                continue;
            }
               
           
# Quadruple
           
$c4 = ord($string[++$i]);
            if( (
$c1 & 8 ) === 0 ) {
               
$u = (($c1 & 15) << 2) + (($c2>>4) & 3) - 1;
           
               
$w1 = (54<<10) + ($u<<6) + (($c2 & 15) << 2) + (($c3>>4) & 3);
               
$w2 = (55<<10) + (($c3 & 15)<<6) + ($c4-128);
               
$json .= sprintf("\\u%04x\\u%04x", $w1, $w2);
            }
        }
    } else {
       
# int, floats, bools, null
       
$json = strtolower(var_export( $data, true ));
    }
    return
$json;
}
?>

[EDIT BY danbrown AT php DOT net: Contains a bugfix by the original poster on 08-DEC-2010 with the following message: "I discovered a rather bad bug in my __json_encode function below. On versions prior to php 5.2.5, all 'f' characters are escaped to '\f'. This is because addcslashes in php < 5.2 doesn't understand \f as 'formfeed'."]
up
13
devilan (REMOVEIT) (at) o2 (dot) pl
6 years ago
For PHP5.3 users who want to emulate/>
<"default">10
) + (($c3 & implode(',', doTn class=">10E8>10; (= '{' .arspan class="default">$c1 var_export <"hiddeg>$data, v/span>'{' .arspan class="default">$c1 0 # int, floats, bools, null
    &nbk);
   ord">) <&sp; <, null
    &nut the \\ character first, as suggested in comments on the 'addclashentem="comment"># int, floats, boo))ring
true ));
    }mbd">= # int, floats, boo,ing UT <, null
    &n0x80="comment"># int, floats, bools, null
    &n0xffff="comment"># int, floats, bools, null
    &n0="comment"># int, floats, bools, null
    &n0xffff="comment"># int, floats, boo'+33123456789') returnspan class>$array
= '{' .arspan class="default">$c1     &n0x80="comment"># int, floats, bools, null
    &n0xffff="comment"># int, floats, bools, null
    &n0="comment"># int, floats, bools, null
    &n0xffff="comment"># int, floats, boo'+33123456789') returnspan class>$array
9698n
28
9698n
9698&ng>6 yearng>
FNick />
<?

9698&amON data to a javascript program, make sur8-04ur pr7gram begins with:

<?php
h9698&acspan class="keyword">(
10w;page= v> nterfacename"
of lass> " c4.21 oteuithle la ge=s="keing UT []itle="Vote u0BBTTY00BINT wouldde
2teu"defge=s="kei(ioten/e=) ract, i.e.:e>: [alt">$data
$data " c4.34 oteuabss=a ge=s="keing UT []itle="Vote u0BBTTY00BINT wouldde, i.e.e>igrjson' ication/json'( data!  stro toi
  • =&e><-">=&e(/spke="V> 2091n
  • 13
    2091n
    2091&rs ago
    6div class="text" id="Hcom105789"> <2091&rass="phpcode"> FSON_NUMERIC_CHECK, really really sure?

    Just2091&amss="keyword">) + ((
    & implode<2091&acspan>(
    5.3+= '+33123456789'; (= '{' .iencode function below. On vers">($oten/">true ));
        }0="comment"># int, floats, bools, null
        &n$from_span class="comment">//encode
    $jfalspan>implo //encode
    $j__FUNspan __ncode function below. On versian>//encode
        &n$ywoan>implo var_exporiscovered a rather bad bug in my __jnregvreplacpan>($val!([\b\tn>        12        imploian>//encode
    );
      &nbse="Vote up!"an class="defanbsp; & (, null
        &n$it">true
    [] = //encode
    55implo var_expor, null
        &n$gulelass="comment">//encode
    ord">);
        &nbstrvrepeaislist
    ) {
     ault">12       
    true # Double byte an>var_expor, null
        &n$gulelass="comment">//encode
    ord">);
      &ault">12   ., null
        &n$_p;pageslist
    ), null
        &nbk);
       ord">) <., null
      ault">12   se="Vote up!"an class="defa;     <, null
        &nut "keyword">(
    $dataimplodefault">is_array$data) ===
    imploo var_exporult">var_expor, null
        &n$gulelass="comment">//encode
    ord">);
      &ault">12   se="Votan class="default">var_exporult">var_expor, null
        &n$gulelass="comment">//encode
    ord">);
      &  &n$_myself class="default">$data
    ) === impl;     true # Double byte an>var_expor}an>var_expornbsp; <, null
        &nut cla class="default">$data
    ) === imploo var_exporult">var_expor, null
        &n$gulelass="comment">//encode
    ord">);
    &eyword">) === //encode
    );
       pan class a bfault">chr
    );
      &nbse="Votan class="default">var_expor}an>var_expornbsp; <, null
        &nut "def class="default">$data
    ) === imploo var_exporult">var_expor, null
        &n$gulelass="comment">//encode
    ord">);
    &  pan class"def="keyword">);
      &nbse="Votan class="default">var_expor}an>var_expornbsp; <, null
        &nut the \\ character first, as suggested in comments on the 'addclashe
    imploo var_exporult">var_expor, null
        &n$gulelass="comment">//encode
    ord">);
    &  pan clas//encode
    oa, null
        &n$_p;pagerd">(
    $dataimplod., null
      ault">12   se="Votan class="default">var_expor}an>var_expornbsp var_exporult">var_expor, null
        &n$gulelass="comment">//encode
    ord">);
    &  n class="k
    implse="Votan class="default">var_expor}an>var_expor, null
        &n$gulelass="comment">//encode
    ord">);
      &ault">12<,/np; } else {
       se="Votan class="defa}an>(imploo var_expor, null
        &n$gulelass="comment">//encode
    rd">);
        &nbsubywoan>implyword">(implls, null
        &n0="comment"># int, floats, boolspan>"\\u%p;       &n$gulelass="comment">//encode
    rd">);
        &nbstrvrepeaislist
    ) {
     ault">12       
    implod.d">);
      &ault">12<{/npelass="comment">//encode
    oa, null
        &n$gulan>implian>//encode
    ord">);
      &ault">12//encode
    oa, null
        &nstrvrepeaislist
    ) {
     ault">12       
    implod.d">);
      &ault">12<}p; } else {
       se="Vote up!"an class="defaiscovered a rather bad bug in my __jsgulan>implian>
    13
    94157&nvote-notcode"> Fsimoncpu0w;pa" r MERIC_CHECK, really really sure?

    Ju94157&amss="keyword">) + ((
    & implod94157&acspan>(: Ifata! '+33123456789'//encode
    );

    (($arrayimplyword">($arrays3)a"isa"an>s6)p"otlawa"an>s5)p"tatan"an>=><56789'//encode
    );

    (($array($arraylt">$char# Double byt]implyword">($arrays3)a"isa"an>s5)p"tatan"an> it> b492n
    10
    b492n
    Fmigprj1.6 or lower, a native json_encode function. This version handles 492&ams, and makes proper distinction between [n [9 07:46 {associative arrays}, mixed arrays work as well. It can handle newl492&acspan>(Ri often necdiv>red to phe-nos=" s"\\\"\ utf8. I's= crea/e=fs="p;vtwo/ is_array(= $data) === UTF8n class="default">is_array    &nut the \\ character first, as suggested in comments on the 'addclashedaislist = $data) === //encode
    ) {
        &ned a rather bad bug in my __jspan">true
    [] = ) {
    &n55& $arraylt">$char
    ) {
    &nb/span>__jsutf8d">= $data) === $arrayions prior to php 5.2.5, all 'f' cha"keyword"/*R....... */  
    "default">is_array
    ($data) === is_array    &nut the \\ character first, as suggested in comments on the 'addclashedaislist $data) === //encode
    ) {
        &ned a rather bad bug in my __jspan">true
    [] = ) {
    &n55& $arraylt">$char
    ) {
    &nb/span>__jsutf8d"}
    $data
    ) === $arrayions prior to php 5.2.5, all 'f' cha"keyword"/*R....... */  ed a rather bad bug in my __jre es
    28
    3219n
    3219&ng>6 year0
    Feep2wl41.6 ukrwer, nsccl>
    <?

    3219&ams, and makes proper distinction betwee3defau3 05:45 {associat4ve arrays}, mixed arrays work as well. It can handle ne13219&acspan>(=><56789'ativ;vnterfacenam
    "default">is_array
    (= '{' .     &nut the \\ character first, as suggested in comments on the 'addclashe $len        &naddsl>8) . c 12efault">$len    an>an>//encode
    15$data)aiscovered a rather bad bug class="de"def="keyword">);
      &nbse="Votan class="defa; <, null
        &ne //encode
    15$data)aiscovered a rather bad bug class="de a bf"keyword">);
      &nbse="Votan class="defa; <, null
        &ne //encode
    15imploaiscovered a rather bad bug class="defalsp="keyword">);
      &nbse="Votan>//encode
    rd">);
        &nbfalspan>implian>++ ) {
               
      &nbe up!"an class="defanbsp; & (, null
        &n$ //encode
    rd">[] =
    ) {
    &n55imploian>var_expor; <, null
        &nekclass="comment">//encode
    !/span>15[oian>var_exporan class="defa, null
        &n$bspocelass="comment">//encode
    rd">);
        &nb a b class="default">$data
    se="Votan class="default">var_exporult">var_exporbsp;kse="Votan class="default">var_expor}an>[] = ) { e up!"an class="defanbsp; & (, null
        &n$ //encode
    rd">[] =
    ) {
    &n55imploian>var_expor55//encode
    rd">);
        &nbeyword">=
    '{' . slist var_expor; <, null
        &nebspocan>imploian>var_exporult">var_expor55//encode
    rd">);
    &  pan classfault">$len        &naddsl>8
    ) . cu class="keyword">) {
    &n)., null
      ault">12efault">$len   
    an>var_expor55//encode
    rd">);
        &nbcu class="keyword">) {
    &n., null
      ault">12e:ault">$len        &n. slist
    var_expor}an>var_expored a rather bad bug in my __jsisdclass="default">$arraylb/span>__js. slist [] =     &numpl '{' 12e,ing($array);an>implo);
       pan class{ault">$len        &n.isdclass="default">$array
    ., null
      ault">12e}fault">chr
    $len        &n.isdclass="default">$array., null
      ault">12e]ault">$len   
    an>E8gt; var_expor(an>var_exporan class="default">var_expor(an>var_exporan class="default">var_exporan class="default">var_expor(an>var_exporan class="default">var_exporan class="default">var_expor(an>, br /faed'."than, es">exan>E8,lt"
    http://wwwuser.net
    28
    7023n
    7023&ng>6 year1g>
    FGorancl>
    <?

    7023&ams, and makes proper distinction betwee5-04-03 07:t;12/span>( " c4clas/>&nb.json-ekind/of warn n ed figure lass> de$array 12edisplay_errhrsing($array= '{' url"}
    $array
    <$array 12edisplay_errhrsing($array= '{' url"}
    $array
    < -stanlassdevsgt; suser.net "> user">https://"> suser.net "> user"> suser.net "> user">https://"> suser.net "> user"> 5733n
    28
    5733n
    5733&rs ago
    7text" id="Hcom118902">
    Fn njSPAM1.6 in> <eSPAM1er, in> cl>
    <?

    5733&ams, and makes proper distinction betwee4default09:4812/span>( "loga" r ,p10 g\\"\difficy _dade' n class=iscoverfalsp it>encodon to"defifyss=tric"\\\"\ dade'
    Lat n-1o1x
    [] =
    ) in comments on the
    (# Double byte an>implyword">(= '{' .aclass="default">$array<s8) "["def,1]"an>rightlof chur=&e(in ault" clrfails,=iscoverfalsp) budCitsagointroduciverrhrs">( daupdat\\"\tov c5=de&vVrev husl ccla>edulddgetsv> restlof n>( da"defc"\\\"\w;panr, in UTF8e(in s=tric"\\\"\w;pusernsed,pcla'd n of anr,ifysit'so"defed)e
    13
    FSam Barnunative json_encode function. This version handl90407&amss="keyword">) + ((& implod90407&acspan>( trotes"> ae=span ced tain n p resy _e="Vote ic"\\\".an clasYla and batch-otes"> a-nos=" eleywor of ae=span c>
    encod_maps
    //encode
    $jencod_mapspan>'{' utf8d">= ($array 5386n
    10
    5386n
    6 year0
    FTibor Halt0"ative json_encode function. This version handles5386&amss="keyword">) + (((resy _s/i dhappene="V>hen ault" clrbinary im s, es">exan>E8dade'= =><56789'[] = $len    an>//encode
    $jyword">= '{' red a rather bad bug in my __jutf8d">= $array< )se="Votan>  'addclashedaia"lass="comment">//encode
    $jutf8d"}
    $jyword"}
    $array
    < )se="Votan> 1843n
    10
    1843n
    7text" id="Hcom118902">
    Fdae=st elearnappwer, a native json_encode function. This version handles1843&amss="keyword">) + (((es"c> ae="keywo/(ex:=s="keing UT)icla and lass=do:  
    =><567 yword">=
    '{' r("keywo), null
        &nbng "lass="comment">//encode
    )fa, null
      'addclashre es  ed a ra  which actmake tscod>=><567 yword">=
    '{' , null
        &nbng character first, as suggeste">(
    //encode
    )fa, null
      'addclashre es
    13
    FDave -ps10sys.a native json_encode function. This version handl99837&ams, and makes proper distinction between efa09 08:46 {associat7an class="keyword">& implod99837&acspan>((oha/spcle n ps=iscoveed by nterfacename".  
    a-nospan c utf8 ss=ke yha/spcafe es">nterfacename";  
        if(
    = '{' utf8yworclass="default">$arrayd in comments on the 'addclashedaiaApan class="default">$array
    <";  
    ($arrayd in comments on the 'addclasheinApan class="default">$array< {  
    //enc'addclashedepthpan class="keyword">++ ) {
               
      &nb  
    //encode
    ) {
    &
    "limio/*/  an class="defa, null
      'addclashedepthpan class="keyword">++ ) { ++ ) {
    $array< {
    impli
      "keyword"/*Rctep=keroughsinApan /*/  an class="defa, null
      /span>  /span>[] =
    //encode
    55$array< {
    $data
    ) ===
    $array<" {
    efspaspan celeywor */  an class="defaan class="defaan class="defa, null
      'addclashenewApan class="default">$arraylt">$char//encode
    b/span>__jsutf8yworclass="default">$arrayd in comments on the 'addclashe $array
    s"\\\"\ $arraylt">$char//encode
    b/span>__jsutf8d">= '{' . &
    $array
    ions prior to php 5.2.5, all 'f' cha'addclashre es  ed a ra  [NOTE BY danbra;< AT 567 DOT nsc: Inclu Unia bugfix by (robbiz233 AT hotr lowDOT "ke" on 18-SEP-ween, ts=replace:  an class="defaenewApan [aultb/sputf8ywor(sinApan )i
    giv da
    ]v
    13
    Fgarydavng(g6 or lower, a native json_encode function. This version handl95667&ams, and makes proper distinction between e1-14 07:3812/span>& implod95667&acspan>(eRin , aeng(ge /;dd ";"/s)>s=" end. ade'< whil> s)>eigure s=triout ss=I thought I'dRcaveioke rs"v> eggravav> ade'=><56789'implyword">(et=utf8 class="default">$arrayimplyword">(E8dlod/"aislnote http://wwwuexan>E8dlod/ mak class="default">$arrayimplyword">($arrayimplyword">($array  'addclashefiE8lass="comment">//encode
    (
    );
      &nbse="Votan class="defa, null
        &nbng "lass="comment">//encode
    rd">);
        &nbsumplexmf_load_fiE8lass="comment">//encode
    .fiE8lass="comment">//encode
    )> xmf"fiE8an>//encode
    rd">);
      &
    $len        &nyword">=
    '{' , null
        &nbng character first, as suggeste)., null
      ault">12e);="keyword">);
      &nbsa, null
      "keyword"//mustimplyword">($arraylt">$char12ec09-back="keyword">);
      &nb]., null
        &n.yworclass="default">$array
      "keyword"//c09-back=ng(prepenbr /fs">nter-789'
    7616n
    10
    7616n
    4class="text" id="Hcom100835">
    Fwebmaed'._567 ( FireFox/erepakeep=ke tscod>spaer, boke Chrom, br /IE ssrdCit. Here'nia litn b /spkaround:  
        if(
    //encode
    rdad">) { an class="defaan class="defan classan class="defaan class="defa, null
        &nbngWrappe class="default">$array
    lt">$char
    12ek="keyword">);
      &nb]/span>__jsencod_nbsspan>) . carChoicsdclass="default">$array);n classan class="defaan class="defa, null
        &nbngWrappe class="default">$array
    lt">$char12ev="keyword">);
      &nb]/span>__jsencod_ ) . carChoicsdclass="default">$array);n classan class="defaan class="defa, null
        &nbault"lass="comment">//encode
    $jyword">= '{' , null
        &nbngWrappe class="default">$array
    );r to php 5.2.5, all 'f' cha'addclashre es
    13
    FIde>atov Vadinative json_encode function. This version handl91434&amss="keyword">) + ((& implod91434&acspan>(    if( '{' , null
        &nLC_ALLspan>'{'">($array"default">is_array<  &nbng "lass="comment">//encode
    rdad">) in comments on the
    chr
    is_array<  &n12.34class="default">$array$jyword">= '{' red a rather bad bug in my __jbng "lass="comment">//encode
    )fr to php 5.2.5, all 'f' cha'addclashre es  ed a ra  Output>encodb":  --------------  {"eleywor":12,34}  --------------    Which ng(NOTia valid ote imarkup.sYla shduldded to phfloat\\"\pot"t variabl> s)>
    s=s">set loc09p s)><\"\stron"LC_NUMERIC, 'en_US.utf8 "db"absp upon_eyword">=
    13
    Fmic/er, sumne "g6 or lower, a native json_encode function. This version handl98718&ams, and makes proper distinction between e7-02 06:3912/span>& implod98718&acspan>( , I had="keywo /> ships, ss="def"keywo/may haveiapaspan cofioke r="keywo dade' < "keywo/prope tieg(priv">, br /mp;vgett rs"br /sett rs, budCIe s)>ault">, variabl>s. (I wan/e=fs)>promass=goodded" clrpraiv>csd budCIotes"> n/d on tos=> n/rmal priv">, prope tieg(budClass=prope tieg(> awhil> enth=no luck, ss=I
    p;vmethods/i< p; & ofata!ran>put>shem/base n>n/di/> s=tris)>/spk,an>=><56789'//encode
    abde>actan>//encode
    ian>($array() ian>var_exporiscovered a rather bad bug 'addclashes=trclass="default">$array-pan>55$array(55) . cs=trclass="default">$array), an class="keyword">($array(55$data) ian>var_exporabsp; &ned a rather bad bug in my __jsapan /, null
      /span>[] =
    chris_array<  &n$
    $data
    ) ian>var_exporan class="defaif <, null
        &nut "keywoclass="default">$array
    (55$data)) ian>var_exporan class="defaan class="defa, null
        &nbng n class="default">$array
    lt">$char//encode
    b/span>__js$ $data-pan>55$array()>an>var_expor}an>var_exporan class="defaif <, null
        &nut $data) ===
    $data)) ian>var_exporan class="defaan class="defa, null
        &nbng n class="default">$array
    lt">$char//encode
    b/span>__js$s=trclass="default">$array-pan>55$array(55$data)>an>var_expor}an>var_expor}an>var_expored a rather bad bug "keyword"// Iffshe/prope ty ipuserge="keywo/s">apan , leaveiit untouchedan>var_expored a rather bad bug /span>$arrayspan clan class="defa}an>(var_exporiscovered a rather bad bug 'addclashyword">= '{' , null
        &nbs=trclass="default">$array
    -pan>55$array()//encin my __jre es n>=><56789'$arrayever/span>$jbs=eOkeywoclass="default">$arrayse="Votan class="defa, null
      "keyword"//or89'$array
    ever/span>$jyword">= '{' , null
        &nbs=eOkeywoclass="default">$array
    -pan>55$array()//encin my __jre es n> ault"fs">s= dhelps>
    28
    8334&rs ago
    2class="text" id="Hcom100835">
    8334&rvote-notcode"> FWalt0" Trosscl>
    <?

    8334&ams, and makes proper distinction betwee5-11-18 10:0212/span>(Rindon/e=fby 2
    28
    "text" id="Hcom118902">
    F m.goes.in." r AT or lo.a native json_encode function. This version handl84997&amss="keyword">) + ((& implod84997&acspan>(anyone">(ohhas run>intofshe/probley/of priv">, prope tieg(n/d be n padded,pcla and sumply impleyworfshe/Itera/orAggregatp
    getItera/ord) method. Ad=fshe/prope tieg(ta! sutput>intofapaspan ci getItera/ord) method br /iscoverit.v
    10
    7968n
    "text" id="Hcom118902">
    Fcraig ( "of b"absp 5.2,v> dmightlhelp:ade'=><56789'$arrayif //encin my __j
    _existspan>) . $array<< ian>(= '{' , null
        &nbdaiaclass="default">$array
    < ian>var_expors>    &netypevlass="comment">//encode
    $jgettypespan>'{' , null
        &nbdaiaclass="default">$array
    <) ian>var_exporan class="defacase $array:an>var_exporan class="defaan class="defaiscovered a rather bad bug
    );
      &nbse="Votan class="default">var_exporan class="defacase
    $array:an>var_exporan class="defaan class="defaiscover , null
        &nbdaiavlass="comment">//encode
    ?
    chr$arrayvar_exporan class="defacase $array:an>var_exporan class="defacase $array:an>var_exporan class="defacase $array:an>var_exporan class="defaan class="defaiscovered a rather bad bug   &nbdaiaclass="default">$arrayspan clan class="default">var_exporan class="defacase
    $array:an>var_exporan class="defaan class="defaiscovered a rather bad bug
    chr
    __jsedds="dhpspan>) . cdaiaclass="default">$array< .pan>$arrayspan clan class="default">var_exporan class="defacase $array:an>var_exporan class="defaan class="defa, null
        &nbdaiavlass="comment">//encode
    $jget_"keywo_varspan>) . cdaiaclass="default">$arrayvar_exporan class="defacase $array:an>var_exporan class="defaan class="defa, null
        &nbsutput_indox_cous="lass="comment">//encode
    $j0class="default">$arrayspan clan class="default">var_exporan class="defaan class="defa, null
        &nbsutput_indoxUd/lass="comment">//encode
    ) { pan clan class="default">var_exporan class="defaan class="defa, null
        &nbsutput_adeociativ;vlass="comment">//encode
    ) { pan clan class="default">var_exporan class="defaan class="defaabsp; &r , null
        &nbdaiavlass="comment">//encode
    rd">[] =
    chris_array<  &n$ $data) ian>var_exporan class="defaan class="defaan class="defa, null
        &nbsutput_indoxUdclass="default">$array
    lb/span>__jsyword">= '{' , null
        &nb $data
    )>an>var_exporan class="defaan class="defa, null
        &nbsutput_adeociativ;class="default">$array
    lb/span>__jsyword">= '{' , null
        &nbultlass="comment">//encode
    < .pan>chr__jsyword">= '{' , null
        &nb $data
    )>an>var_exporan class="defaan class="defaif <, null
        &nbsutput_indox_cous="lass="comment">//encode
    !=span>__jsNULL"lass="comment">//encode
    s="tas="taa, null
        &nbsutput_indox_cous=lass="comment">//encode
    ++ !=span>__jsbultlass="comment">//encode
    < ian>var_exporan class="defaan class="defaan class="defaan class="defa, null
        &nbsutput_indox_cous="lass="comment">//encode
    $jNULLclass="default">$arrayspan clan class="default">var_exporan class="defaan class="defas="defas="defa}an>var_exporan class="defas="defas="defa}an>var_exporan class="defas="defas="defaif <, null
        &nbsutput_indox_cous="lass="comment">//encode
    !=span>__jsNULLlass="comment">//encode
    < ian>var_exporan class="defaan class="defaan class="defaiscovered a rather bad bug
    chr
    __jsimpl '{' , null
     
    ($array< .pan>$arrayspan clan class="default">var_exporan class="defas="defas="defa}rnbsp {an>var_exporan class="defaan class="defaan class="defaiscovered a rather bad bug
    chr
    __jsimpl '{' , null
     
    ($array< .pan>$arrayspan clan class="default">var_exporan class="defas="defas="defa}pan clan class="default">var_exporan class="defain my _:an>var_exporan class="defaan class="defaiscovered a rather bad bug
    );
      &nbsa, null
      "keyword"// Nr, suponrtedan>var_expored a rather bad bug /span>//encin my __jre es ass="civ
    28
    2644&rs ago
    4class="text" id="Hcom100835">
    2644&rvote-notcode"> FCertaiNcl>
    <?

    2644&ams, and makes proper distinction betwee3 e7-08 03:5112/span>(//encin my __j><56789'
    //encode
    $jfoperclass="default">$arrayd in comments on the
    $array">($array//encode
    __jsyword">= '{' ad">) in comments on the
    chr
    is_array<
    $array
    ">(
    chris_array<  &n$fpclass="default">$array<$arrayd in comments on the 'addclasheyworclass="default">$arrayafter]e="Vot cla(falsp)an>b"absp]e="Vot
    (20) "{"a":"foo","b":
    28
    4class="text" id="Hcom100835"> Fandyrued'.holz"g6 o-m-a-i-ower, a-o-native json_encode function. This version handl89908&amss="keyword">) + ((& implod89908&acspan>(anyone">(ohwdulddgootes"> ;pan s intofote , budCis upon_ePHP 4, br /erepuserwss="keywrangle PECL around, " r ng(gaan class=Iywrotp apan s,lit'soquinchoifficy _ ts=represworfmixUd/PHP ;pan s (;pan s ><\"\an kyaif ta!<, ss"it(gamixUd/span c--dseiv> e "keywors"fs">details.  
    exan>E8,lit/erepuserhbr l "keywos) soaif ta!es"rit.  
        if(
    "intofote =represworav> r to ph *r to ph * NOTE: If ta!<, ss"in(gamixUd/sdeociativ;v;r /vywos">apan ,lit/encodprefix p; &rnumericalr to ph * ulta>exan>E8/ad">) "foo", "basiose es "baz")>encodb" transla/e=fintor to ph * {ray<_0": "foo", "basi: "baz"}(budCld">) "foo", "basi)hwdulddb" transla/e=finto [ "foo", "basi ] r to ph *r to ph * @s="km sapan /Th;v;pan "keyed to p.r to ph * @iscovermixUd/Th;vres( <<\"\ote =
    , s">falsp if n>an class="keyword">(
    $arraydred a rather bad bug 'addclasheng n ault">chr
    //encin my __jut $datachrimpli
      'addclashendeociativ;vlass="comment">//encode
      'addclashcous=lass="comment">//encode
    //encode
    ) . carpan class="default">$data)">(
    ) . >() . >(chr  'addclashendeociativ;vlass="comment">//encode
    ){  
      'addclasheconetruc="lass="comment">//encode
    ) {
    &an class="defaan class="defaabsp; &n>(
    chr[] = chris_array<  &n$ //encode
    ){  
    intofaastag n papan ,
    var_expored a rather bad bug /span>  'addclashut numericspan>'{' , null
        &nbultlass="comment">//encode
    < ){
      'addclasheultault">chr
    //enc
    impli
    chr
    $array., null
        &nedds="dhpspan>) . cultlass="comment">//encode
    <., null
      ault">12e"fclass="default">$array
    s  
    var_expored a rather bad bug /span>  'addclashut $data//encode
    )){
      'addclashe //encode
    span>__jsencod_to_yworclass="default">$arraydred a rather bad bug 'addclashe //encode
    )i
    //encin my __jut numericspan>'{' red a rather bad bug 'addclashe //encode
    ) || , null
      'addclashut she \\ character first, as suggestedred a rather bad bug 'addclashe //encode
    ) ){
      'addclashe //encode
    span>$array., null
        &nedds="dhpspan>) . c $data)., null
      ault">12e"fclass="default">$array
    s  an class="defaan class="defas="defas="defa}  
    var_expored a rather bad bug 'addclasheconetruc=class="default">$array
    lb/span>//enc
    c $da
    impli
      "keyword"// Then(ws=collapsiv> e stag n papan >intofshe/ote =f/rm:  an class="defaan class="defa
    cres( chrchr__jsimpl '{' >(impl">(//encode
    < .pan>impli
    isass89wos">(n/d adeociativ;):  
      'addclasheconetruc="lass="comment">//encode
    ) {
    &an class="defaan class="defaabsp; &n>(
    chr[] = //encode
    ){  
    var_expored a rather bad bug /span>  'addclashut $data//encode
    )){
      'addclashe //encode
    span>__jsencod_to_yworclass="default">$arraydred a rather bad bug 'addclashe //encode
    )i
    //encin my __jut numericspan>'{' red a rather bad bug 'addclashe //encode
    ) || , null
      'addclashut she \\ character first, as suggestedred a rather bad bug 'addclashe //encode
    ) ){
      'addclashe //encode
    span>$array., null
        &nedds="dhpspan>) . c $data)., null
      ault">12e"fclass="default">$array
    s  an class="defaan class="defas="defas="defa}  
    var_expored a rather bad bug 'addclasheconetruc=class="default">$array
    lb/span>c $datai
      "keyword"// Then(ws=collapsiv> e stag n papan >intofshe/ote =f/rm:  an class="defaan class="defa
    cres( chrchr__jsimpl '{' >(impl">(//encode
    < .pan>impli
    impli
    13
    Fryr bat ryr parmanwer, a native json_encode function. This version handl97008&ams, and makes proper distinction between e3-27 01:3612/span>& implod97008&acspan>(acrossfshe/"bug" w" r runnon_eyword">= htt7:/ bugsuser.net/42001 mak ;r /
    htt7:/ bugsuser.net/41976, mak ;r /whil> Iss=reeo>
    poed'./> s="gcuyworav> shdulddelarify gotchas go s)>figur sut howis)>/spkaroundrit.vn>s=SimpleXML="keywo/back=nntofapaXML=
    , then(re-imonrtlit/back=nntofSimpleXML=upon_etse(LIBXML_NOCDATA opv> Once ta!= $arr"keyword"// Piscer /wd>already haveia "keplex=SimpleXML="keywo/storUd/i//encode
    $jyword">= '{' new/span>$jSimpleXMLEleyworpan>) . cxml an>) .-pan>55) . )">(//encode
    ))span cllass="comment">//encin my __jre es ass="civ
    28
    2class="text" id="Hcom100835"> FGapaettative json_encode function. This version handl86513&amss="keyword">) + ((& implod86513&acspan>(n/di/absut yword">= c09-y quo<<\"\numbers:ade' s=yword">= explaiacross:ade' sawhen(numbers app cl(ag(
    s=s)>aultd">= <"striand lead/s)>probleys >expywoon_etse( <"striwag(discove edawhen(wer;vwer;vrebr ev<\"\fieldsvfrom she/daiabase which ed tais=yword">= numeric\ sriginal bpan >wer;vnowibe n ptreatr /;g(
    s=br /show n pupo> <"se fix: Piis">s)>otes"on_etse(apan ,lser lit/tofaaan class=which ehecks"fs">numeric\types=br /ca>ts accbr on_ly. Etes"on_efrom shenfspa/spkr /;g(expywoed.v
    10
    4278n
    2class="text" id="Hcom100835"> FMr S
    (mp;vISO-8859-1=br /a l/d of åäöÅÄÖ=br /n/d > UTF-8 budCimp;vketrilidi/> on_ei madeg><  
        if(
    //encode
    an class="keyword">(
    = '{' , null
        &nbirclass="default">$array
    < {
        &nb_escapevlass="comment">//encode
        &nbmixclass="default">$array
    < {
    ) . cmixclass="default">$array">(impl)i
        &nbsut ult">chr
    impli
        &nut "keywoclass="default">$array
    (55$array<< {
    //encode
    $jget_"keywo_varspan>) . (55$array<//encode
    ) {
    &an class="defaabsp; &r , null
        &nbcclas_vars"lass="comment">//encode
    rd">[] =
    chris_array<  &n$ $array< {
    $arrayl>[] =
    $arrayb/span>impl{, null
        &nb_escapeclass="default">$array
    (55//encode
    <}an>impl{, null
        &nb $array
    }an>impli
      'addclashe //encode
    $jimpl '{' , null
     
    ($arraychr
    impl{, null
        &nb $array
    }an>impli
    $data
    ) === $array<< {
    //encode
    $jfalspan>impli
    //encode
    ) {
    &an class="defaabsp; &) === //encode
    AS">[] =
    chris_array<  &n$ $array< {
    //encin my __jut numericspan>'{' , null
        &nbultlass="comment">//encode
    << {
    //encode
    $j a ban>impli
    $arrayl>[] =
    $arrayb/span>= '{' , null
        &nb $array
    $array< {
    ) === //encode
    AS">[] =
    chris_array<  &n$ $array< {
    $array
    l>[] =
    $arrayb/span>impl{, null
        &nb_escapeclass="default">$array
    (55//encode
    <}an>impl{, null
        &nb $array
    }an>impli
    //encode
    $jimpl '{' , null
     
    ($arraychrimpl{, null
        &nb $array
    }an>impli
    //encode
    $jimpl '{' , null
     
    ($arraychrimpl{, null
        &nb $array
    }an>impli
        &nut cla class="default">$data
    ) === $array<< {
    chr
    //encode
    ?
    chr$arrayi
    $data
    ) === $array<< {
    chr
    );
      &nbs
    ) === $array
    << {
    chr
    impl{, null
        &nb_escapeclass="default">$array
    (55$array<}an>impli
    chr
    impli
    impl{, null
        &nb"utclass="default">$array
    }an>impli
        &nre es
    <<=ketritries">everyoneg><, null iv id="Vd105789">
    13
    F5hunter5bat maiower, ruative json_encode function. This version handl96248&ams, and makes proper distinction between e2-17 03:0312/span>& implod96248&acspan>(=     &npan>//encode
    publicaan class="keyword">(
    = $array()n class{  an class="defaabsp; &r , null
        &nbketriclass="default">$array
    rd">[] =
    chris_array<  &n$ $data)  an class="defa{
    $array-pan>55chrc $datai
    = '{' , null
        &nbyworclass="default">$array
    ($array(, null
        &nbywor_mixclass="default">$array//encode
    $jywordde= $array(, null
        &nbywor_mixclass="default">$array">($array//encode
    rd">[] = chris_array<  &n$ $data)  an class="defa{
    $array-pan>55chrc $datai
    expres> saw<, null iv id="Vd105789">
    28
    5655&rs ago
    1text" id="Hcom118902">
    5655&rvote-notcode"> FRay.Pase!rfofuer>mp;s Gmaiocl>
    <?

    5655&ams, and makes proper distinction betwee4-efa02 06:1512/span>(iand b;v;rv;ralog"of apaXML="gcuywor,etse(answ r=is>probably otepe."s="defaXML= &.s="defaA\ote =
    it">eratr /byvnword">= encodn/d haveitse(atcributen br /n/ error s">exceplass=wncodissue - v> sriginal daiavwncodstmply b;vlos&.s="defaTodseiv> is"in(giv> :
        &npan>) === //encode
    (pree esfclass="default">$array
    span cl89'$arr"keyword"// STARTING FROMaXML
    //encode
    pan>pan>EOD
    d=1.0" re es n> />rediworse es n> />rediwore es n>tcode estomavrepsan>/tcode es n>quss=ity\typerr"id=e es4san>/quss=itye es n>/ />rediwore es n> />rediwore es n>tcode essaltsan>/tcode es n>quss=ity\typerrtabl>spoon=e es2san>/quss=itye es n>/ />rediwore es n>/ />rediworse es n>//encode
    EODspan cl89'$arr"keyword"// CREATES AN ARRAY OF SimpleXMLEleywor OBJECTS
    //encode
    $jSimpleXML_Load_She \\ character first, as suggestedspan class="keyword">) === ) .$arrayd in comments on the 'addclashe"keclass="default">$array($arr"keyword"// SHOW THE ATTRIBUTES HIDDEN IN THE SimpleXMLEleywor OBJECTS
    absp; &r , null
        &nb"ke"lass="comment">//encode
    rd">[] =
    $array< class{
    chr
    $array-pan>55chrchr$array-pan>55$arrayl>[] =
    $array]span cl}pan clet;?>($arr"keyword"// USING THE OBJECT, CREATEaA\ote =STRING
    //encode
    $jyword">= '{' , null
        &nb"keclass="default">$array
    ($arraysp null iv null iv id="Vd105789">
    13
    Fhtt7:/ mo) + ((& implod9281712cspan>( trian class=drepa> & alwn s produc;vlegal ote .e="Votan>//encode
    $jyword">= '{' >[] = $array$arrayd in comments on the 'addclasheyworclass="default">$array(5) ""foo""pan cl89'$arr  &nbywor"lass="comment">//encode
    $jyword">= '{' , null
        &n23class="default">$array
    $arrayd in comments on the 'addclasheyworclass="default">$array(2) "23"pan cl(produc;vote => //encode
    $jpreg_reolac/span>'{' >[] = (($arrays=ywordde= esw/ote =fragywors"w 0265n
    10
    0265n
    1text" id="Hcom118902">
    Fmat(s=risk"of it/be n pncoegal ote ,=
    //encode
    $jpreg_reolac/span>'{' >[] = ((= '{' , null
        &nbw $array
    <)span cllass="comment">//encin my __jre es ass="civ
    10
    5923n
    1text" id="Hcom118902">
    Frob (waultd">=     &npan>$arrayl>[] = $array] ) (chris_array<
    impl">(chris_array<  &n a ban>impl    &n$">= //encode
    $jyword">= '{' , null
        &n$"keywoclass="default">$array
    );
        &nre es
        &npan>= //encode
    $jyword">= '{' , null
        &nencod_ '{' , null
        &n$"keywoclass="default">$array
    )(
    3137n
    10
    3137n
    1text" id="Hcom118902">
    Fpvower, kolensikov"g6 omaiower, a native json_encode function. This version handl10313712ms, and makes proper distinction betwee1-03-28 08:3512/span>(= struc=ur sf/"keywosg  
        &npan>//encode
    ">//e>(
    //encode
    {
    //encode
    $j1class="default">$arrayi
    //encode
    $j2class="default">$arrayi
    (
    ) {
    &
    $array(){
    dred a rather bad bug 'addclashei"keyword">($arrayfa((--pan>55$array;){
    '{' , null
        &n$ketrclass="default">$array-pan>55impl">new/span>$jBclass="default">$array);
    //e>(
    //encode
    {
    //encode
    $j1class="default">$arrayi
    //encode
    $j2class="default">$arrayi
    ($jAlass="comment">//encode
    );
        &nre es
    6417n
    10
    6417n
    1text" id="Hcom118902">
    Fmmi"g6 uhb-conep; <\"\dr, (= = s=s)>NULLawhen(detywoon_eumlauosa> & be n pUTF8">= ian class=lnd vice-to >a. The "keywo/hlndl n pmigh& be buggyCbudCme<  
        if(
    //encode
    an class="keyword">(
    = '{' , null
        &n$stilass="comment">//encode
    )
        &nut she \\ character first, as suggestedspan class="keyword">) === //encode
    )< {
    = ) === //encode
    )s  an class="defaan class="defas="defa}  an class="defas="defas="defas="defaif <, null
        &nut "keywoclass="default">$array
    (55//encode
    )< {
        &n$"vrclass="default">$array
    $jget_"keywo_varspan>) . span class="keyword">) === //encode
    )s  an class="defaan class="defas="defas="defa, null
        &n$new"keyword">(
    //encode
    s  an class="defaan class="defas="defas="defaabsp; &r , null
        &nb"vriclass="default">$array
    rd">[] =
    chr//encode
    )an class="defa{  an class="defaan class="defas="defas="defas="defas="defa, null
        &n$new"keyword">(
    -pan>55(= '{' , null
        &n$new"keyword">(
    -pan>55()s  an class="defaan class="defas="defas="defa}  an class="defas="defas="defas="defas="defaiscovered a rather bad bug   &n$new"keyword">(s  an class="defaan class="defas="defa}  an class="defas="defas="defas="defa  an class="defas="defas="defas="defaif //encin my __jut $data) === //encode
    )< iscovered a rather bad bug   &n$stilass="comment">//encode
    s  an class="defaan class="defas="defaed a rather bad bug   &n$isc="keyword">(
    ) {
    &s="defaan class="defas="defas="defaabsp; &) === $arrayrd">[] = (55//encode
    ) ed a rather bad bug   &n$isclass="comment">//encode
    l>[] =
    (b/span>= '{' , null
        &n$s"keyword">(
    )s  an class="defaan class="defas="defaiscovered a rather bad bug   &n$isclass="comment">//encode
    ;
    (
    '{' , null
        &n$stilass="comment">//encode
    )
        &nut she \\ character first, as suggestedspan class="keyword">) === //encode
    )< {
    $array
    (, null
        &nbstilass="comment">//encode
    )s  an class="defaan class="defas="defa}  an class="defas="defas="defas="defaif <, null
        &nut "keywoclass="default">$array
    (55//encode
    )< {
        &n$"vrclass="default">$array
    $jget_"keywo_varspan>) . span class="keyword">) === //encode
    )s  an class="defaan class="defas="defas="defa, null
        &n$new"keyword">(
    //encode
    s  an class="defaan class="defas="defas="defaabsp; &r , null
        &nb"vriclass="default">$array
    rd">[] = chr//encode
    )an class="defa{  an class="defaan class="defas="defas="defas="defas="defa, null
        &n$new"keyword">(
    -pan>55('{' , null
        &n$new"keyword">(
    -pan>55()s  an class="defaan class="defas="defas="defa}  an class="defas="defas="defas="defas="defaiscovered a rather bad bug   &n$new"keyword">(s  an class="defaan class="defas="defa}  an class="defas="defas="defas="defa  an class="defas="defas="defas="defaif //encin my __jut $data) === //encode
    )< iscovered a rather bad bug   &n$stilass="comment">//encode
    s  an class="defaan class="defas="defaed a rather bad bug   &n$isc="keyword">(
    ) {
    &s="defaan class="defas="defas="defaabsp; &) === $arrayrd">[] = (55//encode
    ) ed a rather bad bug   &n$isclass="comment">//encode
    l>[] =
    (b/span>'{' , null
        &n$s"keyword">(
    )s  an class="defaan class="defas="defaiscovered a rather bad bug   &n$isclass="comment">//encode
    ;
    28
    8569&lass="geno on.jsg>
    0text" id="Hcom118902">
    8569&lvote-notcode"> Frdeechtiacl>
    <?

    8569&ams, and makes proper distinction betwee5-12-30 03:3812/span>(easy readv;pan ,l"keywo,>path, etc ault"pisct "pe \t w) "\\r","\\n","\\t"), "",nword">= !\\\\)(\\$|\\\\)#', "", bault)span cll9'pree esfspan clpe \t_r(bault)span clet;?span>/pree espan>hre esfspan clan class="defas="defas="defas="defas="defa,an clif($die) die()span cl}pan clpan cl//inputpan cll9')r ,9'yous="defa:)v
    28
    7615&rs ago
    0text" id="Hcom118902">
    7615&rvote-notcode"> FDormilichcl>
    <?

    7615&ams, and makes proper distinction betwee5-07-08 05:5412/span>( interfac/ bp ;wari/> rowon_eany>exceplass=from wed ;r /spaexceplass=sayon_e"Fai-r /c09-on_eYourC>rown instead<, null iv id="Vd105789">
    28
    3618&rs ago
    0text" id="Hcom118902">
    3618&rvote-notcode"> Finfo"g6 pkruleswer, iran>
    <?

    3618&ams, and makes proper distinction betwee3-e1-06 01:2412/span>( & keymp;vtse ">= $array=ad">) (
    55$array,(55$array,(55$array,(55$array,($array55()span cll9'$jyword">= '{' , null
        &n$ng class="default">$array
    <.(
    ran>impli ed a rather bad bug "keyword"//{"a":1,"b":2,"c":3,"d":4,"e":5}pan clpan cl, null
        &npe \t_riclass="default">$array
    , null
        &nywordde= $array
    (, null
        &nyword">= '{' , null
        &n$ng class="default">$array
    <<)span cllass="comment">//enc"keyword"////encode
    et;?>(ran>impli ed a rather bad bug lass="defava class="default">$array=, null
        &nyword">=
    '{' , null
        &n$ng class="default">$array
    $array , null
        &nywordde= $array(, null
        &nava class="default">$array,(impl<)span cllass="comment">//enc"keyword"//Ad">)r [a] se es 1 [b] se es 2 [c] se es 3 [d] se es 4 [e] se es 5 ) classlass="comment">//encode
    et;?>(
    ran>impli ed a rather bad bug lass="defpe \t_riclass="default">$array , null
        &nywordde= $array
    (, null
        &nyword">=
    '{' , null
        &n$ng class="default">$array
    <<,(impl<>
    28
    3495&rs ago
    0text" id="Hcom118902">
    3495&rvote-notcode"> Fdrdamouran>
    <?

    3495&ams, and makes proper distinction betwee3-e0-18 11:0512/span>( & doakeya licensispanonflic&.s="defaAs such cla may ner /keyinstall ault"s ault"=
    28
    3416&rs ago
    0text" id="Hcom118902">
    3416&rvote-notcode"> Fzac"g6 javazac"er, a native json_encode function. This version handl113416&ams, and makes proper distinction betwee3-e0-08 04:2712/span>( tn pnnetse ">ildsif cla ari/v cla<\"\daiavpu9-r /from a db becamp;vit/tur sanumeric=
    s"intofshemon_ly=appropriat;viors"or floaosgiUse w I'v/ bpet"ed ;anumberfoftiom>s by otumbers"/> s"iesretlly=precip;vlat/lims.s="defaaultd">= = esw/as floaosCbudCshe/precipass=oftihe/daiavis sovlargi/> eanumberfoff Inetsis/answ/I ha /keyre ey=s<, null iv id="Vd105789">
    28
    1788&rs ago
    0text" id="Hcom118902">
    1788&rvote-notcode"> Fck"g6 ergovia\dr, ()rkeyyword">= s=isd x->imerfofti>s=reep; <\"\ote -
    idepends"onetse systemiPHP is/runn />i pan cll9') "a" ,a"b",a"c"nword">= tne/runn />idebispaI get:e="Votan> eskey: here was/keymp;vencod_e nbtne/keycretinia psociativepad">)randr> en(p= = 6445n
    10
    6445n
    0text" id="Hcom118902">
    Fspm"g6 bf-teamwer, a native json_encode function. This version handl106445&ams, and makes proper distinction betwee1-e1-09 11:2912/span>(= = = 2628n
    10
    2628n
    0text" id="Hcom118902">
    FMatroas/Leppichcl>
    <?

    (= )rcla migh& want/keymp;:
    htt7:/ gist.gn/dub.e n/820694 makean clpan cl,her bad bug   &n><56789'() (9'chr) ($array$array),89'chr) ($array$array),89'//enc"keyword"/*pan cl== INpan cl"keywo() 1) {89'(3) "mooccn>(4) "miaoccn>) 1) {89'(3) "mooccn>(4) "miaoccn> 1546n
    10
    1546n
    0text" id="Hcom118902">
    Fmarc"g6 leftekwer, a native json_encode function. This version handl101546&ams, and makes proper distinction between e2-23 10:0812/span>(iempty/apan s and ner on_etse Jte _FORCE_OBJECT oplass=budC> & upon_e5.3=yet,lcla and subsionuiniaspignon_eaniempty/"keywo:e="Votan>$data)) ed a rather bad bug   &n$ad">)r"keyword">(impli s="defas="defaed a rather bad bug   &n$iscovered a rather bad bug ay$jyword">= '{' , null
        &n$ng an class="default">$data
    )span cllass="comment">//encin my __jre es ass="civ
    10
    0272n
    0text" id="Hcom118902">
    Ftomag(at matfyzwer, azative json_encode function. This version handl100272&ams, and makes proper distinction between en e5 07:4312/span>(= ass=lllows/key">= s"as">ote =regardlessfofti>s=ch anct r=ser:  
        &npan>'{' , null
     
    impl">(impl">('{' , null
        &n$she \\ character first, as suggeste">(
    $array));
        &nre es
    eanul=ch anct r= as">"keylt"
    s,"oke r="unustroawncd=ch anct rs"ago & hlndled<, null iv id="Vd105789">
    10
    0text" id="Hcom118902">
    Fnico clwer, baplaste"g6 omaiower, a native json_encode function. This version handl9945712ms, and makes proper distinction between 08-18 08:4912/span>(//encode
    et;?>(
    $jyword">= '{' ad">) (impl"(impl"(impl)($jyword">= '{' ad">) ($arrayimpl"($arrayimpl"($arrayimpl<)span cllass="comment">//encin my __jre es an cllass="coan clWicodgive :e="Votan>
    10
    0text" id="Hcom118902">
    Faangil"g6 nulmwer, a native json_encode function. This version handl8879012ms, and makes proper distinction betwe09-02-07 05:5012/span>(keygetyose pesk "pe vtin/protywor /variabl>s:e="Votan>$jKiiiclass="default">$arraytmpleyworu>($jIt rats"Aggregagenclass="default">$array{e="Votan>($array(, null
        &nava class="default">$array) {89'    &nut "keywoclass="default">$array(55$array)) {89'we areaclonon_89'$array-pan>55$j$va class="default">$array-pan>55impli s="defas="defas="defas="defas="defs="defaed a rather bad bug   &n$ketrclass="default">$array-pan>55$j$va class="default">$array-pan>55impli s="defas="defas="defas="defas="defs="defaabsp; &r , null
        &nbva class="default">$array
    -pan>55)r"keyword">(rd">[] =
    (    &nbval ban>impl< {89'$array-pan>55)class="default">$arrayl>[] =
    $arrayb/sp ad">)), null
        &nbval ban>impli s="defas="defas="defas="defas="defs="defa} s="defas="defas="defas="defa} s="defas="defa} s="defs="defag>< s="defas="defaed a rather bad bug "keyword"//aCretinianiit rats">becamp;vpe vtin/protywor /vars/ann't s="defas="defa//ab" = implpublicaan class="keyword">($array(< {89'    &nbiAd">)class="default">$arrayl>[] = $arrayb/span>$array-pan>55impli s="defas="defas="defas="defa, null
        &nbiAd">)class="default">$array
    l>[] =
    $arrayb/span>$array-pan>55impli s="defas="defas="defas="defa, null
        &nbiAd">)class="default">$array
    l>[] =
    )fclass="default">$arrayb/sp ad">)), null
        &nbketrclass="default">$array-pan>55)class="default">$arrayi s="defas="defas="defas="defaiscovernew/span>$jAd">)It rats"class="default">$array(, null
        &nbiAd">)class="default">$array)i s="defas="defa}89'//encin my __jre es ass="ca,an clpan clC09-on_etn pgo= getIt rats"());s="defawicodgive cla almost w $array{espan class="default
    impl:espan class="default
    impl"(nbsp;class="default">$arr
    impl:espan class="default
    impl"(nbsp;class="default">$arr
    )ran>impl:{espan class="default
    impl:{espan class="default
    impl:espan class="default
    impl"(impl:espan class="default
    impl} } } pan cllass="comment">//encin my __jre es an cllass="coan clN/diceetsadCshe/produc=Ad">)ris/ad to pr /key;rl"keywo ignoron_etse cwhich is/> & =
    ) pan cll9'andr> e/"nly=w>)rI'v/ found>keygetyit"intofshe/properfokeywo type is/keymp;ve conetruc=orv> eaokeywo tse ">)rit's"$array=rnew/span>$jKiiclass="default">$array(, null
        &nywordde= $array(, null
        &nailass="comment">//encode
    )//encin my __jre es ass="civ
    10
    0text" id="Hcom118902">
    Fjjossative json_encode function. This version handl78719&ams, and makes proper distinction betwe07 en 24 12:0712/span>()rkey Thlnks/keyJsHttpRequnsbsdevelopers pan cll9'$arrayan class="keyword">('{' , null
        &n$aclass="default">$array
    =, null
        &nfalsban>impl    &nut nullan>impl , null
        &n$aclass="default">$array
    )< iscovered a rather bad bug
    $array
    ;cnbsp;s="defaif <, null
        &n$aiclass="default">$array
    ==span>impl< iscovered a rather bad bug
    $array
    ;cnbsp;s="defaif <, null
        &n$aiclass="default">$array==span>impl< iscovered a rather bad bug
    $array
    ;cnbsp;s="defaif <, null
        &nut scala class="default">$array , null
        &n$aclass="default">$array)    &nut floaoclass="default">$array , null
        &n$aclass="default">$array)floaosg89'$array=aed a rather bad bug   &nmix_reolac/span>'{' , null
     
    impl">(impl">(impl , null
        &n$aclass="default">$array
    )s"tof;void/isd t rminismg89'andr1 ari/vqtroaas">all PHP operats"s, but s="defas="defa//aJS's""1">andr1 ari/nok. Soaif we(ps">1/from tse PHP backend,89')< s="defas="defa//aCh anct r=reolac/yworu>as">ote < s="defas="defaed a rather bad bug ult">implstatica, null
        &n$ $array
    ) ad">) (
    $array">(
    impl">(impl">(impl">(impl">(impl">(impl">($array),89') ($array">($array">($array">($array">($array">((($array)$array.aed a rather bad bug   &nmix_reolac/span>'{' , null
        &n$ '{'l>[] = $array]">(
    '{'l>[] = $array]">($array) .aed a rather bad bug
    $array
    i s="defa} s="defa($array=ran>impli s="defaas">(, null
        &nbiiclass="default">$array
    =ran>$array">(//encode
    , null
        &n$aclass="default">$array
    )fa($array>a(//encode
    , null
        &n$aclass="default">$array
    )fa($array++">($array , null
        &n$aclass="default">$array)    &nay$array , null
        &n$aclass="default">$array) !=span>$array$array=ran>impli s="defas="defas="defabreaki s="defas="defa}89'$array) );cnbsp;s="defaif <, null
        &n$isLisiclass="default">$array
        &nbaiclass="default">$arrayrd">[] = $array) ('{'lb/span>'{' , null
        &n$vclass="default">$array
    )i s="defas="defaiscovered a rather bad bug
    $array
    .aed a rather bad bug   &njoiranan>'{' , null
     
    ('{') .aed a rather bad bug
    $array
    i s="defa} s="defaelsbanbsp;s="defa{89'    &nbaiclass="default">$array
    rd">[] =
    (    &nbvclass="default">$array
    ) ('{'lb/span>'{' , null
        &n$kclass="default">$array
    ).(
    '{' , null
        &n$vclass="default">$array
    )i s="defas="defaiscovered a rather bad bug
    $array
    .aed a rather bad bug   &njoiranan>'{' , null
     
    ('{') .aed a rather bad bug
    $array
    i s="defa} }pan clpass="comment">//encin my __jre es ass="civ
    10
    7250n
    -1text" id="Hcom118902">
    Fjulien\dr, (ppl w= <)dgives cla \\u...../righ& ?  
        &npan>//enc"keyword"/* Imagtne/cla have arl"keywo gohtt7:/ payAtterlass.example.e n mak"},{otcode:ctookeme brainack"j'étaon malemec","urle:c
    Sux"=relnotefollowctiargit="_blank">htt7:/ sllahpsEscap />Sux mak"}] pan cl*/  
    =     &n$myDirtySbr />iclass="default">$array=ran>= '{' , null
        &n$myOkeywoclass="default">$array
    );
    //enc"keyword"/*tse Jte _UNESCAPED_SLASHES,>andrJte _UNESCAPED_UNICODE be />iunavaioabl>,lcla'll have happenon_e:  
    Sux\\/"}] pan cl*/  
        &n$myDirtySbr />iclass="default">$array=ran>'{' , null
     
    impl", null
     
    impl", null
        &n$myDirtySbr />class="default">$array
    );
    //enc"keyword"//Then,aas">tse br ck, escapeCdoule qu35">
        &n$myDirtySbr />iclass="default">$array
    =ran>'{' , null
     
    $array
    ,(
    $array,(class="default">$array);
    //enc"keyword"//irl"merftofnwordde= (andrgetlya!r utf8ymnescaped)
    //enc  &n$myCleanedSbr />iclass="default">$array=ran>$array(, null
     
    $array.(class="default">$array.($array);
    //enc"keyword"// Je ke!r nsbsjouéi!  // There migh& b/ bptt r=w>)s"tofdovit/budCi found>so much ="hlessfnonsense as"umsv> tonigh&
        &nre es ass="civ
    10
    4784n
    -1text" id="Hcom118902">
    FRijk v />Welative json_encode function. This version handl10478412ms, and makes proper distinction betwee1-07-07 02:1812/span>(itumbersv">=apsulated/iseay
    (daiabnswrreep; s and post requnsbs areaalwn s v clasd/ag(
    types,aas">example). Sen on_eover/variabl>s/from a daiabnswrreep; dirywoly=(ag(
    ) wouldycamp;vtse nword">= which in/tur wouldymak" tse Javascript(s.aAs Javascript(isn'tyloo"hly typed,=ose variabl>s/ag(row id/iseaydaiavinstancegiUson_etse aabspmerlassr /fla pand preventitron from happenon_ pan cll9'$array
    ) aed a rather bad bug
    $array
     
    ($array 
    $array)fa($arrayet;?>($jyword">= '{' >($array">($array)fa(    &nre es ass="civ
    10
    -2text" id="Hcom118902">
    Frlz_ar"g6 yahoower, a native json_encode function. This version handl94359&ams, and makes proper distinction betwe09-en 29 08:3512/span>(ms w= )s,lcla and absce nword">= = andr> enymp;vywordde= )r"keyword">() ((($array);89'    &n$myng an class="default">$datal>[] = $array]);89'= )r"keyword">($jyword">= ( >($data">($array);89' enycla and rebr v" tse daiavdo />:89')r"keyword">())ran>( >(= )r"keyword">();89' 6547n
    10
    6547n
    -2text" id="Hcom118902">
    Fodanive json_encode function. This version handl10654712ms, and makes proper distinction betwee1-e1-17 11:1712/span>(s::e="Votan>= ($t) ?=utf8d">=
    10
    -2text" id="Hcom118902">
    Fumbrae"g6 omaiower, a native json_encode function. This version handl80339&ams, and makes proper distinction betwe08-01 10 10:2112/span>(    &npan>//enc"keyword"// Piscty pr /t=//encode
    an class="keyword">(
    $array , null
        &n$nwor"keyword">(
    )n class{  s="defas="defaed a rather bad bug   &naiabr"keyword">(
    impl;  s="defas="defaed a rather bad bug   &nanew_nworr"keyword">(impl;  s="defas="defaed a rather bad bug   &naisd nt_leveliclass="default">$array=ran>$array;  s="defas="defaed a rather bad bug   &nais sbr />iclass="default">$array=ran>impli  
    $array
    =ran>$array(, null
        &n$nwor"keyword">(
    )i  
        &n$nwordobjiclass="default">$array==span>impl<
    impli  
    (
    $jyword">= $array(, null
        &n$nwordobj"keyword">(
    )i  s="defas="defaed a rather bad bug   &nalerr"keyword">($jsbrlerclass="default">$array(, null
        &n$nwor"keyword">()i  
        &n$ca, null
      ay=ran>$array;aed a rather bad bug   &naca, null
      ay>a($array;aed a rather bad bug   &nacclass="default">$array++<
    $array=ran>$datal>[] = $array]i  s="defas="defas="defas="defasw    &n$cha class="default">$array)  s="defas="defas="defas="defa{  s="defas="defas="defas="defas="defas="defacnswr($array:  s="defas="defas="defas="defas="defas="defacnswr($array:  s="defas="defas="defas="defas="defas="defas="defas="defaif(!ed a rather bad bug   &nais sbr />class="default">$array)  s="defas="defas="defas="defas="defas="defas="defas="defa{  s="defas="defas="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &nanew_nworr"keyword">(.=ran>$array.aed a rather bad bug
    $array.aed a rather bad bug   &nmix_reoeaoclass="default">$array , null
        &n$iab class="default">$data">($array+>[] = $array)i  s="defas="defas="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &naisd nt_levelclass="default">$array++i  s="defas="defas="defas="defas="defas="defas="defas="defa}  s="defas="defas="defas="defas="defas="defas="defas="defaelsb  s="defas="defas="defas="defas="defas="defas="defas="defa{  s="defas="defas="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &nanew_nworr"keyword">(.=ran>$array;  s="defas="defas="defas="defas="defas="defas="defas="defa}  s="defas="defas="defas="defas="defas="defas="defas="defabreaki  s="defas="defas="defas="defas="defas="defacnswr($array:  s="defas="defas="defas="defas="defas="defacnswr($array:  s="defas="defas="defas="defas="defas="defas="defas="defaif(!ed a rather bad bug   &nais sbr />class="default">$array)  s="defas="defas="defas="defas="defas="defas="defas="defa{  s="defas="defas="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &naisd nt_levelclass="default">$array--i  s="defas="defas="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &nanew_nworr"keyword">(.=ran>$array.aed a rather bad bug   &nmix_reoeaoclass="default">$array , null
        &n$iab class="default">$data">($array) .aed a rather bad bug pan class$ch aclass="default">$array;  s="defas="defas="defas="defas="defas="defas="defas="defa}  s="defas="defas="defas="defas="defas="defas="defas="defaelsb  s="defas="defas="defas="defas="defas="defas="defas="defa{  s="defas="defas="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &nanew_nworr"keyword">(.=ran>$array;  s="defas="defas="defas="defas="defas="defas="defas="defa}  s="defas="defas="defas="defas="defas="defas="defas="defabreaki  s="defas="defas="defas="defas="defas="defacnswr($array:  s="defas="defas="defas="defas="defas="defas="defas="defaif(!ed a rather bad bug   &nais sbr />class="default">$array)  s="defas="defas="defas="defas="defas="defas="defas="defa{  s="defas="defas="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &nanew_nworr"keyword">(.=ran>$array.aed a rather bad bug   &nmix_reoeaoclass="default">$array , null
        &n$iab class="default">$data">($array);  s="defas="defas="defas="defas="defas="defas="defas="defa}  s="defas="defas="defas="defas="defas="defas="defas="defaelsb  s="defas="defas="defas="defas="defas="defas="defas="defa{  s="defas="defas="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &nanew_nworr"keyword">(.=ran>$array;  s="defas="defas="defas="defas="defas="defas="defas="defa}  s="defas="defas="defas="defas="defas="defas="defas="defabreaki  s="defas="defas="defas="defas="defas="defacnswr($array:  s="defas="defas="defas="defas="defas="defas="defas="defaif(!ed a rather bad bug   &nais sbr />class="default">$array)  s="defas="defas="defas="defas="defas="defas="defas="defa{  s="defas="defas="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &nanew_nworr"keyword">(.=ran>impl;  s="defas="defas="defas="defas="defas="defas="defas="defa}  s="defas="defas="defas="defas="defas="defas="defas="defaelsb  s="defas="defas="defas="defas="defas="defas="defas="defa{  s="defas="defas="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &nanew_nworr"keyword">(.=ran>$array;  s="defas="defas="defas="defas="defas="defas="defas="defa}  s="defas="defas="defas="defas="defas="defas="defas="defabreaki  s="defas="defas="defas="defas="defas="defacnswr($array:  s="defas="defas="defas="defas="defas="defas="defas="defaif(ed a rather bad bug   &naca, null
      ay& es , null
        &n0a, null
      ay&="ta&="taran>$datal>[] = $array->[] = $array] !=ran>$array)  s="defas="defas="defas="defas="defas="defas="defas="defa{  s="defas="defas="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &nais sbr />iclass="default">$array=r!ed a rather bad bug   &nais sbr />class="default">$array;  s="defas="defas="defas="defas="defas="defas="defas="defa}  s="defas="defas="defas="defas="defas="defa  :  s="defas="defas="defas="defas="defas="defas="defas="defaed a rather bad bug   &nanew_nworr"keyword">(.=ran>$array;  s="defas="defas="defas="defas="defas="defas="defas="defabreakis="defas="defas="defas="defas="defas="defas="defas="defas="defas="defa  s="defas="defas="defas="defa}  s="defas="defa}    s="defas="defaiscovered a rather bad bug pan classanew_nworclass="default">$array;  }  ed a rather bad bug pan classre es ass="civ
    10
    5683n
    -2text" id="Hcom118902">
    Fgrk/spld1"g6 yahoower, a wer, iranive json_encode function. This version handl10568312ms, and makes proper distinction betwee1-09-07 02:4512/span>(mclay dimerlass encode="Votan>$arrayan class="keyword">($array , null
        &n$ar class="default">$array"an>$array=, null
        &n1class="default">$array"an>$array=, null
     
    impl((rd">[] = $array=pan>55impl<
    $data
    , null
        &n$val ban>impl<<
    $array
    .=ran>$array.(
        &n$counte class="default">$arr
    ran>impl.($array , null
        &n$val ban>impl,(ed a rather bad bug   &nacounte class="default">$array+>[] =
    $array)).(impl.($array.(~Y~|ran>impl.($array.(impli s="defas="defas="defas="defa} s="defas="defas="defas="defaelsbanbsp;s="defas="defas="defas="defa{ s="defas="defas="defas="defas="defas="defaed a rather bad bug   &nasbrclass="default">$array.=an>$array.(    &n$counte class="default">$arr
    ran>impl.(impl.(    &n$counte class="default">$arr
    impli s="defas="defas="defas="defa} s="defas="defa} s="defas="defaiscovered a rather bad bug pan classrbr mclass="default">$array , null
        &n$sbrclass="default">$array
    ", null
     
        &n$counte class="default">$arr
    impl);89'($array , null
        &n$sbrclass="default">$array
    ", null
      pan class$counte class="default">$array
    =, null
        &n1class="default">$array"an>$array=ad">) )"an>$array=ad">) )$array=an>$array(, null
     
        &n$counte class="default">$arr
    impl"an>$array)i s="defas="defacnbsp;s="defas="defaabsp; & >((rd">[] = $array=pan>55impl<
    $array=an>$array(, null
     
        &n$counte class="default">$arr
    ran>impl"an>impl[] = $array=, null
        &n$t1class="default">$array
    l>[] =
    $array]i s="defas="defas="defas="defa>[] =
    $array=, null
        &n$t1class="default">$arrayl>[] = $array]i s="defas="defas="defas="defaif <, null
        &n$t1class="default">$arrayl>[] = $array]==, null
     
    impl$arrayl>[] = $array]=, null
        &nmix_2_ar class="default">$array , null
        &n$vvclass="default">$array,(ed a rather bad bug   &nacounte class="default">$array+>[] = $array))i s="defas="defas="defas="defa} s="defas="defas="defas="defaelsbanbsp;s="defas="defas="defas="defa{ s="defas="defas="defas="defas="defas="defaed a rather bad bug   &naar class="default">$arrayl>[] = $array]=, null
        &n$vvclass="default">$arrayi s="defas="defas="defas="defa} s="defas="defas="defas="defa s="defas="defa} s="defas="defaiscovered a rather bad bug pan classaar class="default">$array;89'$array=ad">) );89'$arrayl>[] = $array]=, null
     
    impli an>$arrayl>[] = $array]l>[] = $array]=, null
     
    impli an>$arrayl>[] = $array]l>[] = $array]=, null
     
    impli an>$arrayl>[] = $array]l>[] = $array]l>[] = $array]=, null
     
    impli an>$arrayl>[] = $array]l>[] = $array]l>[] = $array]l>[] = $array]=, null
     
    impli an>$arrayl>[] = $array]l>[] = $array]l>[] = $array]l>[] = $array]=, null
     
    impli an>$arrayl>[] = $array]l>[] = $array]l>[] = $array]=, null
     
    impli pr /t=, null
     
    ran>impl;89'$array , null
        &n$ar class="default">$array
    );89' 
    >brpan>>brpan>ran>impl;89'  pan class$ssttr class="default">$array=an>$array , null
        &n$ar class="default">$array
    );89' 
    >brpan>>brpan>ran>impl;89'$array , null
        &nmix_2_ar class="default">$array
    , null
        &n$ssttr class="default">$array));89'= >brpan>>brpan>ri pr /t_r(ywordde= $arraypr /t=, null
     
    ran>impl;89'
    10
    -1text" id="Hcom118902">
    Fjfdsmit"g6 omaiower, a native json_encode function. This version handl7868812ms, and makes proper distinction betwe07-en 23 07:3112/span>(= int008als/budCthr"ugdishe/It00ato">int00facegiThep;vtwo/an class=will tak" careaofti>at:e="Votan>cnbsp; * over/its"public properties. Becamp;vtson fn class=mp;sishe/absp; &cnbsp; * conmixuwo,>It00ato"s arearespywoed.>Itralso works on/ad">)saoft"keywos.e="Vot *lnbsp; * @iscoverencode="Vot */lnbsp;class="default">$arrayan class="keyword">($data , null
        &n$va class="default">$array
    )a{ s="defas="defa, null
        &n$reep; class="default">$array= ad">) );89'    &n$refer">=ed">[] = = ad">) );89'  "keyword"// loop over/elpmerls/properties89'  ayabsp; & <, null
        &n$v aiclass="default">$arrayrd">[] = [] = =& es , null
        &n$val ban>implimplif <, null
        &nis_okeywoclass="default">$array
    , null
        &n$val ban>impl< || , null
        &nis_ng an class="default">$data
    , null
        &n$val ban>impl<implif $data , null
        &n$val ban>impl">(=edan>impl<    &n$reep; class="default">$arrayl>[] = $array] =ran>$data , null
        &n$val ban>impl    &n$refer">=edan>impl[] =ran>impli s="defas="defas="defas="defas="defas="defa} s="defas="defas="defas="defa}aelsba{ s="defas="defas="defas="defas="defas="defaed a rather bad bug "keyword"// simple val bs areauntouched s="defas="defas="defas="defas="defas="defaed a rather bad bug   &nareep; class="default">$arrayl>[] = $array] =ran>impli s="defas="defas="defas="defa} s="defas="defa} s="defas="defaiscovered a rather bad bug pan classareep; class="default">$array;89'= )sacontainon_e"keywosv>ocnbsp; * lasociat v" encodn first. Tron way,("keywosv> int00face areaalsey">= $arrayan class="keyword">(= $array , null
        &n$, anman>impl    &nis_okeywoclass="default">$array , null
        &n$, anman>impl    &nis_ng an class="default">$data , null
        &n$, anman>impl<$array=ran>$data , null
        &n$, anman>impl= $array(, null
        &n$, anman>impl
    10
    -2text" id="Hcom118902">
    Fdennispopel(at)omaio.a native json_encode function. This version handl7736712ms, and makes proper distinction betwe07-08-26 10:4312/span>( ults ('').>I W enyIaswo PHP5'siyword">= a=bug=isport,/budCthon qu ck/835"amay save ted/ss=kwo boxes),/ss=my XP w=
    10
    -2text" id="Hcom118902">
    FYi-RenyChen(at NCTU CSIEative json_encode function. This version handl7487812ms, and makes proper distinction betwe07-05-01 09:5512/span>(= arly versass=oftphp which support "mclaibyinctbudCdoesn'tysupport "nword">=     &n><56789'  ayan class="keyword">(= class="default">$array(, null
        &n$is sbran>impl<89'    &nmb_int008al_v claon_class="default">$array(, null
     
    impl);89'[] = = ad">) ($array">($array">($array">($array);89'$array=ran>impl;cnbsp;s="defas="defaabs(, null
        &n$iclass="default">$array
    =, null
        &nmb_sbrlerclass="default">$array
    (, null
        &n$is sbran>impl<->[] = $arrayfaed a rather bad bug   &naiclass="default">$array& es=, null
        &n0class="default">$arrayfaed a rather bad bug   &naiclass="default">$array--<
    $array=ran>$array , null
        &n$is sbran>impl">(impl">($array)i s="defas="defas="defaif(ed a rather bad bug   &nmb_ere_class="default">$array(, null
     
    ran>impl"ran>= $data , null
        &n$mb_ch aan>impl">(impl">(impl)">(impl<< s="defas="defas="defa{ s="defas="defas="defas="defa($array=ran>$array(, null
     
    impl"ran>impll>[] = $array]) .aed a rather bad bug pan class$sbran>impli s="defas="defas="defa} s="defas="defas="defaelsbanbsp;s="defas="defas="defa{ s="defas="defas="defas="defa($array=ran>$array.aed a rather bad bug pan class$sbran>impli s="defas="defas="defa} s="defas="defa} s="defas="defaiscovered a rather bad bug pan classasbran>impli s="defa} s="defaan class="keyword">(= $data , null
        &n$ar class="default">$array
    )89'    &n$nword$array
    =ran>impl;cnbsp;s="defas="defaif(ed a rather bad bug   &nis_ng an class="default">$data , null
        &n$ar class="default">$array
    )<
    $array
    =ran>impli s="defas="defas="defa, null
        &n$ar ay_lergthiclass="default">$array
    =ran>$data , null
        &n$ar class="default">$array
    )i s="defas="defas="defaabs(, null
        &n$iclass="default">$array
    =, null
        &n0class="default">$array
    fed a rather bad bug   &naiclass="default">$array&ln>55$arrayfed a rather bad bug   &naiclass="default">$array++< s="defas="defas="defa{ s="defas="defas="defas="defaif(!/isset , null
        &n$ar class="default">$arrayl>[] = $array]<<
    $array=ran>impli s="defas="defas="defas="defas="defabreaki s="defas="defas="defas="defa} s="defas="defas="defa} s="defas="defas="defaif(ed a rather bad bug   &napure_ng anclass="default">$array)89'$array=an>impli s="defas="defas="defas="defa($array= ad">) );89'    &n$iclass="default">$array=, null
        &n0class="default">$arrayfed a rather bad bug   &naiclass="default">$array&ln>55$arrayfed a rather bad bug   &naiclass="default">$array++$arrayl] =ran>$array(, null
     
    impl"ran>= $data , null
        &n$ar class="default">$array
    l>[] = $array]<$array.=ran>$array(, null
     
    impl"an>$array[] = $array.=, null
     
    impli s="defas="defas="defa} s="defas="defas="defaelsbanbsp;s="defas="defas="defa{ s="defas="defas="defas="defa($array=an>impli s="defas="defas="defas="defa($array= ad">) );89'    &n$ar iclass="default">$arrayrd">[] = [] = =& es , null
        &n$val ban>impl<(
    $array
    l] =ran>$array(, null
     
    impl"ran>$array"ran>= $data , null
        &n$val ban>impl<$array.=ran>$array(, null
     
    impl"an>$array[] = $array.=, null
     
    impli s="defas="defas="defa} s="defas="defa} s="defas="defaelsbanbsp;s="defas="defa{ s="defas="defas="defaif(ed a rather bad bug   &nis_sbr />class="default">$array(, null
        &n$ar class="default">$array
    )<
    $array
    =ran>impl.aed a rather bad bug pan classyword">= class="default">$array(, null
        &n$ar class="default">$array
    ) .aed a rather bad bug
    impli s="defas="defas="defa} s="defas="defas="defaelsbaif(ed a rather bad bug   &nis_numericclass="default">$array(, null
        &n$ar class="default">$array
    )<
    $array=ran>$arrayi s="defas="defas="defa} s="defas="defas="defaelsbanbsp;s="defas="defas="defa{ s="defas="defas="defas="defa($array=ran>impl.aed a rather bad bug pan classyword">= class="default">$array(, null
        &n$ar class="default">$array
    ) .aed a rather bad bug
    impli s="defas="defas="defa} s="defas="defa} s="defas="defaiscovered a rather bad bug pan classanwordimpli s="defa} ass="civ
    10
    -2text" id="Hcom118902">
    Fgiuntawer, gaetano(at sea-aeroportimilano(er, itative json_encode function. This version handl6939312ms, and makes proper distinction betwe06-09-04 08:1112/span>( = sv>osbeav clasd/>osbeain UTF8aabsmat, while by pan cla PHPa
    svareaISO-8859-1av clasd pan clTron meansv> = ) 'àü'));89', whilepan cll9'= ) utf8d">= osde= < />, too,aoftcourseg>
    10
    -1text" id="Hcom118902">
    Fkvz(at php er, netative json_encode function. This version handl11303712ms, and makes proper distinction betwee3-08-21 09:4012/span>(= er"visvany chs vea> e variable you'reaaboudCtey">= e inpudCng ani1 levelsdeep. Oi>ers wrigenfuloaaledged rywurs v"aan classsishemselves. W>er"asvasaoftPHP5 you aduldyalseyutiliz" encod_walk_rywurs v"89'$array(, null
        &n$inpudAg anclass="default">$array
    ,aan class(s="ta, null
        &n$valclass="default">$array) { s="defas="defa, null
        &n$valiclass="default">$array=ran>= $data , null
        &n$valclass="default">$array= $array(, null
        &n$inpudAg anclass="default">$array);89' 0968n
    10
    0968n
    -4text" id="Hcom118902">
    F m er, >er"ver, pls(at hotmaiower, a native json_encode function. This version handl10096812ms, and makes proper distinction betwee0-11-17 12:4212/span>(er way/as">pre-5.2.0 PHPausersvis/uson_erawurler= = andrde= osde= Ioshlndle(PHPaencodn andrconverttshemCteyyavascript absmat.>Itrmp;si"keywo 835alassaas">aasociat v" encodn andrad">)saas">> e 35>er. Nestispais/supported.>True,aaalsb,>int0gers,aaloaosvandrnuloaval bs areapreswored inarespywo v" yavascript syorax pan cll9' is/n cla, load itainto"> e browser/uson_eajaxvandrthen(de= e
    svin > e reep; on_e"keywo/uson_eyavascript an class=de= eavxample reep; sseyit shoudsbea0 0righb. Feelsfre/Cteymp;vtson pan cll9'$array
    n cla ld a rather bad bug pan classcustom_nworiclass="default">$array
    {89'  "keyword"/**lnbsp;s="defas="defs="defa* Convert"gncod=teyyavascript "keywo/encode="Vots="defas="defs="defa* @, anmigncod=$gncod=th" encode="Vots="defas="defs="defa* @iscoversbr />c="Vots="defas="defs="defa*/lnbsp;s="defas="defa, null
      aypublic s5alacaan class="keyword">(= $data , null
        &n$ar anclass="default">$array)89'  "keyword"//=determin;vtypbanbsp;s="defas="defas="defas="defaclass="default">$arrayif(ed a rather bad bug   &nis_numericclass="default">$array(, null
        &nky$array , null
        &n$ar anclass="default">$array)<  "keyword"//=indexed (list<(
        &n$oudpudCclass="default">$array=ran>impli s="defas="defas="defas="defas="defas="defaabs(, null
        &n$iiclass="default">$array
    =ran>$array">($array=r , null
        &nmiz"ofclass="default">$array(, null
        &n$ar anclass="default">$array) - , null
        &n1class="default">$array)i/isset , null
        &n$ar anclass="default">$arrayl>[] = $array]<; ++>[] = $array$data , null
        &n$ar anclass="default">$arrayl>[] = $array]<)a, null
        &n$oudpudCclass="default">$array.=ran>$array::"keyword">(= $data , null
        &n$ar anclass="default">$arrayl>[] = $array]<; s="defas="defas="defas="defas="defas="defas="defas="defaelsbs="defa, null
        &n$oudpudCclass="default">$array.=ran>$array::"keyword">($array , null
        &n$ar anclass="default">$arrayl>[] = $array]<; s="defas="defas="defas="defas="defas="defas="defas="defaif(ed a rather bad bug   &naiiclass="default">$array!==ran>$array    &n$oudpudCclass="default">$array.=ran>impli s="defas="defas="defas="defas="defas="defa} s="defas="defas="defas="defas="defas="defa, null
        &n$oudpudCclass="default">$array
    .=ran>impli  s="defas="defas="defas="defa}aelsba{  s="defas="defas="defas="defas="defas="defa, null
      "keyword"//=aasociat v" ("keywo<(
        &n$oudpudCclass="default">$array
    =ran>impli s="defas="defas="defas="defas="defas="defa($array=r, null
        &nmiz"ofclass="default">$array(, null
        &n$ar anclass="default">$array) - , null
        &n1class="default">$arrayi s="defas="defas="defas="defas="defas="defa($array=ran>$arrayi s="defas="defas="defas="defas="defas="defaabsp; & , null
        &n$ar aniclass="default">$arrayrd">[] = [] = =& es , null
        &n$val ban>impl    &n$oudpudCclass="default">$array.=ran>impl.>[] = impl.>[] = impli s="defas="defas="defas="defas="defas="defas="defas="defaif(ed a rather bad bug   &nis_ng an class="default">$data , null
        &n$val ban>impl<    &n$oudpudCclass="default">$array.=ran>$array::"keyword">(
    = $data , null
        &n$val ban>impl<; s="defas="defas="defas="defas="defas="defas="defas="defaelsbs="defa, null
        &n$oudpudCclass="default">$array
    .=ran>$array::"keyword">(
    $adata , null
        &n$val ban>impl<; s="defas="defas="defas="defas="defas="defas="defas="defaif(ed a rather bad bug   &naiiclass="default">$array!==ran>$array    &n$oudpudCclass="default">$array
    .=ran>impli s="defas="defas="defas="defas="defas="defas="defas="defa++>[] = $arrayi s="defas="defas="defas="defas="defas="defa} s="defas="defas="defas="defas="defas="defa, null
        &n$oudpudCclass="default">$array.=ran>impli  s="defas="defas="defas="defa}89'  "keyword"//=iscoveanbsp;s="defas="defas="defas="defaclass="default">$arrayiscovered a rather bad bug pan classaoudpudan>impli  s="defas="defa}89'  "keyword"/**lnbsp;s="defas="defs="defa* [INTERNAL] Fbsmataval be="Vots="defas="defs="defa* @, anmimixed $vali> e val be="Vots="defas="defs="defa* @iscoversbr />c="Vots="defas="defs="defa*/lnbsp;s="defas="defa, null
      ay
    private s5alacaan class="keyword">($adata , null
        &n$valclass="default">$arrayclass="default">$array(, null
        &n$valclass="default">$array<)aiscovered a rather bad bug
    impl.>[] = $array(, null
        &n$valclass="default">$array<.>[] = impli s="defas="defas="defas="defaelsbif(ed a rather bad bug   &nis_int class="default">$data , null
        &n$valclass="default">$array
    <)aiscovered a rather bad bug pan classmpr /tfclass="default">$array(, null
     
    impl">($array$data , null
        &n$valclass="default">$array<)aiscovered a rather bad bug pan classmpr /tfclass="default">$array(, null
     
    impl">($array$adata , null
        &n$valclass="default">$array<)aiscover , null
        &n$vala, null
      ay?red a rather bad bug
      ay:red a rather bad bug
    implimpli s="defas="defa}89'$arrayecho ld a rather bad bug pan classcustom_nworclass="default">$array::"keyword">(= $data ad">) (impl">(impl">(impl<);89'$arrayecho ld a rather bad bug pan classcustom_nworclass="default">$array::"keyword">(= $data ad">) (  ay=& es , null
     
    impl">(  ay=& es , null
     
    impl<);89'er"v**lnbsp;, null
        &n$big_5">ticlass="default">$array
    =rad">) (nbsp;s="defas="defaad">) (nbsp;s="defas="defas="defas="defa, null
     
      ay
    =& es ad">) (
    impl">(impl<,(nbsp;s="defas="defas="defas="defa, null
     
      ay
    =& es , null
        &n27an>impl"(nbsp;s="defas="defas="defas="defa, null
     
      ay
    =& es , null
        &n0class="default">$array
    "(nbsp;s="defas="defas="defas="defa, null
     
      ay
    =& es , null
        &n180.53class="default">$array"(nbsp;s="defas="defas="defas="defa, null
     
      ay=& es , null
        &ntr ban>impl"(nbsp;s="defas="defas="defas="defa, null
     
    'a, null
      ay
    =& es , null
     
    impl"(nbsp;s="defas="defa<,(nbsp;s="defas="defaad">) (nbsp;s="defas="defas="defas="defa, null
     
      ay
    =& es ad">) (impl">(impl<,(nbsp;s="defas="defas="defas="defa, null
     
      ay
    =& es , null
        &n642class="default">$array
    "(nbsp;s="defas="defas="defas="defa, null
     
      ay
    =& es , null
        &nnuloclass="default">$array"(nbsp;s="defas="defas="defas="defa, null
     
      ay=& es , null
        &n92.21class="default">$array"(nbsp;s="defas="defas="defas="defa, null
     
      ay=& es , null
        &nfalsban>impl"(nbsp;s="defas="defas="defas="defa, null
     
    'a, null
      ay
    =& es , null
     
    impl">(tiutf8 >er"lnbsp;s="defas="defa, null
      ay
    $array::"keyword">(= $data , null
        &n$big_5">tan>implsl9'') daia[item] = de=
    10
    -4text" id="Hcom118902">
    Folivierver, psssier, no(er, s m at gmaiower, a native json_encode function. This version handl9580512ms, and makes proper distinction betwee0-01-22 07:1312/span>( ult Php will csssider it'svan "keywo:    aher bad bug pan class><567 89'echo ld a rather bad bug pan classyword">= $array(ad">) (impl=& es(tt ca'an>impl<); lnbsp;echo ld a rather bad bug pan classyword">= $array(ad">) (tt ca'an>impl<); lnbsp;ld a rather bad bug pan classre es lnbsp;ld a ra  Wtt ca"}  ["t">tt ca"]    Bewareaofti>ea
    ults!&d a raiv id="Vd105789">
    10
    -3text" id="Hcom118902">
    Fgu(= = sbr /> w$arrayan class="keyword">(= $data , null
        &n$mV aan>impl", null
        &n$fnC0 0backan>impl=(implimpl (nbsp;s="defas="defas="defas="defa, null
     
    impl"(nbsp;s="defas="defas="defas="defaan class= , null
        &n$aResan>impl    &n$fnC0 0backan>impl    &n$aResan>impll>[] = $array]=, null
        &nsubsbrclass="default">$array
    , null
        &n$aResan>impll>[] = $array]", null
        &n1class="default">$array
    )", null
        &n$sOudan>impl=(impl"an>$array=, null
        &n0class="default">$array
    "an>$array=, null
        &n0class="default">$array
    "an>impl=, null
        &n0class="default">$array
    fed a rather bad bug   &naiclass="default">$array
    &ln>=ran>$array(, null
        &n$aResan>impll>[] = $array]) s="tas="ta>(
    impl.=ran>$array , null
        &n$aResan>impll>[] = $array]", null
        &naian>impl", null
        &n1class="default">$array
    )fed a rather bad bug   &naiclass="default">$array
    ++    &nmubsbrclass="default">$array
    , null
        &n$aResan>impll>[] = $array]", null
        &naian>impl", null
        &n1class="n class="default">implimpl    &n$iOperclass="default">$array++; s="defas="defas="defas="defas="defas="defas="defas="defaelsbaifr , null
        &nmubsbrclass="default">$array
    , null
        &n$aResan>impll>[] = $array]", null
        &naian>impl", null
        &n1class="n class="default">impl  ayANDa, null
        &n$iOpera, null
      ay
    ==a++>[] =
    impl)abreaki s="defas="defas="defas="defas="defas="defaiscovered a rather bad bug pan classis_c0 0ableclass="default">$array , null
        &n$fnC0 0backan>implimpl , null
        &n$sOudan>impl<.>[] = impll>[] = $array] :red a rather bad bug   &n$fnC0 0backan>impl , null
        &n$sOudan>impl<.>[] = impll>[] = $array]fa(
      pan classyword">= $array
    (, null
        &n$mV aan>impl  ay= ad">) a(
     
      ay
    =& es , null
     
    impl"(nbsp;s="defas="defa, null
     
      ay
    =& es , null
     
    INPUT /& es").attr("typbe,It can)fa}'an>impl"(nbsp;s="defas="defa, null
     
      ay
    =& es ad">) (nbsp;s="defas="defas="defas="defa, null
     
    impl=& es(impl"(nbsp;s="defas="defas="defas="defa, null
     
    impl=& es(impl"(nbsp;s="defas="defas="defas="defa<,(nbsp;s="defas="defa, null
     
      ay
    =& es , null
     
    $array
      ay
    = (
    impl;89' 
    nword">= impl.>[] = = $data , null
        &n$aDaiaan>impl<.>[] = impli echos="defa, null
     
    __nword">= impl.>[] = = $data , null
        &n$aDaiaan>impl<.>[] = impli lnbsp;echos="defa, null
     
    nword">= impl.>[] = = $data , null
        &n$sDaiaan>impl<.>[] = impli echos="defa, null
     
    __nword">= impl.>[] = = $data , null
        &n$sDaiaan>impl<.>[] = impli lnbsp;(nword">= INPUT \/& es\").attr(\"typb\",\It ca\n)fa}e,Iay<3":{ault3.1":"val3.1",Iay<3.2e:"fn class(__nword">= INPUT /& es").attr("typbe,It can)fa},Iay<3":{ault3.1":"val3.1",Iay<3.2e:fn class(nword">= __nword">=
    10
    -6text" id="Hcom118902">
    Fme at danieower, ieative json_encode function. This version handl9462912ms, and makes proper distinction betwe09-11-15 08:4512/span>( e reep; snword">= e query wer"vbeon_equored ina> e JSON oudpudC(i.e.,a> ey wer"vbeon_etreared asv
    s). In >imer=teyfixstron, itais necessard=teyexplicon y cladCp; &aeleyworaofti>eagncod=beabsp>nword">= osdoe> is/nastisp pan clpan cl
        &n><56789'  ay
    = (
    $data , null
     
    impl">(impl">(im'an>impl$data , null
     
    impl  ay= (impli s="defas="defa(  ay= ($data , null
        &n$query class="default">$data
      aywhile , null
        &n$rows, null
      ay
    = (
    $data , null
        &n$resan>impl<every fieodvin > e reep; .. s="defas="defas="defas="defa(as">(ed a rather bad bug   &nai, null
      ay
    =ed a rather bad bug   &n0class="default">$array
    fa, null
        &n$ia(> (impl , null
        &n$resan>impl    &n$ian>impl++    &n$info ld a rather bad bug ay= (impl , null
        &n$resan>impl">($array= (-& es(impli lnbsp;s="defas="defas="defas="defas="defas="defa(reallnbsp;s="defas="defas="defas="defas="defas="defa(implifr , null
        &n$typb ld a rather bad bug ay
    == (
    impl< s="defas="defas="defas="defas="defas="defas="defas="defa, null
        &n$rowan>impll>[] = $adata , null
        &n$rowan>impll>[] = int nbsp;s="defas="defas="defas="defas="defas="defa(implifr , null
        &n$typb ld a rather bad bug ay
    == (
    impl< s="defas="defas="defas="defas="defas="defas="defas="defa, null
        &n$rowan>impll>[] = $adata , null
        &n$rowan>impll>[] = impll] = (impli s="defas="defa}89'oge5>er asaone big encode="Vots="defas="def ld a rather bad bug ayecho ld a rather bad bug pan classyword">= $array(, null
        &n$rowsan>implimpl(, null
        &n$mysql class="default">$data
        &n?& es( 0679n
    10
    0679n
    -5text" id="Hcom118902">
    Fser at ia clwer, a wer, ukative json_encode function. This version handl10067912ms, and makes proper distinction betwee0-10-29 04:0212/span>(= )saescapbs a solidus (as"ward s>http://bugsuser.net/buguser"> w< 0 st< 0 be > e   behaviour pan clA cru
    add@2x.p/>'aalt='addee 835"' wcodm0 0>addee 835"v m0 0> make >ext" i eiv> >