php 长整形转字符串

$str = '{"id":5730528714937479169,"fullname":"rourou","email":null,"mobile":"1391730****","description":null}';
$str = preg_replace('/"id":(\d{1,}),/', '"id":"\\1",' ,  $str);

echo $str;

$jsondata=json_decode($str,true);

echo "<pre>";
var_dump($jsondata);

你可能感兴趣的:(php 长整形转字符串)