3 Star 0 Fork 0

Gitee 极速下载/php-cjson

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/rryqszq4/php-cjson
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

php-cjson

Build Status

The php-cjson is a fast JSON parsing and encoding support for PHP extension.

Install

$/path/to/phpize
$./configure --with-php-config=/path/to/php-config
$make && make install

Example

encode

<?php
$arr = array(
	1,
	"string",
	array("key"=>"value")
);
var_dump(cjson_encode($arr));

/* ==>output
string(28) "[1,"string",{"key":"value"}]";
*/
?>

decode

<?php
$str = '[1,"string",{"key":"value"}]';
var_dump(cjson_decode($str));

/* ==>output
array(3) {
  [0]=>
  int(1)
  [1]=>
  string(6) "string"
  [2]=>
  array(1) {
    ["key"]=>
    string(5) "value"
  }
}
*/
?>

空文件

简介

php-cjson 是快速的 JSON 解析和生成的 PHP 库,基于 cjson 底层 C 库开发 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/php-cjson.git
git@gitee.com:mirrors/php-cjson.git
mirrors
php-cjson
php-cjson
master

搜索帮助