title: PHP `json_encode` incorrectly turn array into `{}`
body: <p>My system is centos 7.4 with PHP 5.4  </p>
  
  <pre><code>$s='a:91:{s:13:"spotsviewvars";s:7:"1916.74";s:13:"100000T18vars";N;s:17:"100000T18S106vars";s:7:"1746.95";s:17:"100000T18S107vars";s:4:"4.49";s:17:"100000T18S108vars";s:4:"8.29";s:17:"100000T18S109vars";s:4:"4.38";s:17:"100000T18S110vars";s:3:"5.4";s:17:"100000T18S111vars";s:4:"3.88";s:17:"100000T18S112vars";s:4:"3.49";s:17:"100000T18S113vars";s:4:"5.55";s:17:"100000T18S114vars";s:4:"3.58";s:17:"100000T18S115vars";s:3:"5.5";s:17:"100000T18S116vars";s:5:"10.39";s:17:"100000T18S117vars";s:4:"6.52";s:17:"100000T18S118vars";s:4:"6.09";s:17:"100000T18S119vars";s:3:"6.7";s:17:"100000T18S120vars";s:4:"4.18";s:17:"100000T18S121vars";s:5:"14.81";s:17:"100000T18S122vars";s:3:"3.9";s:17:"100000T18S123vars";s:4:"4.93";s:17:"100000T18S124vars";s:4:"4.06";s:17:"100000T18S125vars";s:4:"5.03";s:17:"100000T18S126vars";s:4:"5.73";s:17:"100000T18S127vars";s:4:"3.13";s:17:"100000T18S128vars";s:3:"7.2";s:17:"100000T18S129vars";s:4:"7.03";s:17:"100000T18S130vars";s:4:"3.81";s:17:"100000T18S131vars";s:3:"7.4";s:17:"100000T18S132vars";s:4:"7.82";s:17:"100000T18S133vars";s:4:"3.96";s:13:"100000T19vars";N;s:17:"100000T19S134vars";N;s:17:"100000T19S135vars";N;s:17:"100000T19S136vars";N;s:17:"100000T19S137vars";s:5:"12.54";s:17:"100000T19S138vars";N;s:17:"100000T19S139vars";N;s:17:"100000T19S140vars";N;s:17:"100000T19S141vars";N;s:17:"100000T19S142vars";N;s:17:"100000T19S143vars";N;s:17:"100000T19S144vars";N;s:17:"100000T19S145vars";N;s:17:"100000T19S146vars";N;s:17:"100000T19S147vars";N;s:17:"100000T19S148vars";N;s:17:"100000T19S149vars";N;s:13:"100000T18S106";s:2:"A2";s:13:"100000T18S107";s:2:"A2";s:13:"100000T18S108";s:2:"A2";s:13:"100000T18S109";s:2:"A2";s:13:"100000T18S110";s:2:"A2";s:13:"100000T18S111";s:2:"A2";s:13:"100000T18S112";s:2:"A2";s:13:"100000T18S113";s:2:"A2";s:13:"100000T18S114";s:2:"A2";s:13:"100000T18S115";s:2:"A2";s:13:"100000T18S116";s:2:"A2";s:13:"100000T18S117";s:2:"A2";s:13:"100000T18S118";s:2:"A1";s:13:"100000T18S119";s:2:"A2";s:13:"100000T18S120";s:2:"A1";s:13:"100000T18S121";s:2:"A1";s:13:"100000T18S122";s:2:"A2";s:13:"100000T18S123";s:2:"A2";s:13:"100000T18S124";s:2:"A2";s:13:"100000T18S125";s:2:"A2";s:13:"100000T18S126";s:2:"A1";s:13:"100000T18S127";s:2:"A2";s:13:"100000T18S128";s:2:"A1";s:13:"100000T18S129";s:2:"A1";s:13:"100000T18S130";s:2:"A2";s:13:"100000T18S131";s:2:"A2";s:13:"100000T18S132";s:2:"A1";s:13:"100000T18S133";s:2:"A2";s:13:"100000T19S134";N;s:13:"100000T19S135";N;s:13:"100000T19S136";N;s:13:"100000T19S137";s:0:"";s:13:"100000T19S138";N;s:13:"100000T19S139";N;s:13:"100000T19S140";N;s:13:"100000T19S141";N;s:13:"100000T19S142";N;s:13:"100000T19S143";N;s:13:"100000T19S144";N;s:13:"100000T19S145";N;s:13:"100000T19S146";N;s:13:"100000T19S147";N;s:13:"100000T19S148";N;s:13:"100000T19S149";N;}';
  $s_array=unserialize($s);
  var_dump($s_array);
  $s_json=json_encode($s_array,JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS|JSON_UNESCAPED_UNICODE);
  var_dump($s_json);
  </code></pre>
  
  <p>You will notice strange result when run above PHP script.  </p>
  
  <p><code>$s_array</code> is <code>array</code>,<code>json_encode</code> result should be something like <code>[]</code>,but result is <code>{}</code>.<br>
  What's the problem? </p>