JSON, . 1 , ( , MySQL ).
include , 9 . file_get_contents(), 1 , . PHP 1: 9 strlen() ( var_export()).
json_encode(), . (PHP , , JSON, .) JSON 670 .
JSON file_get_contents , 0,75 . json_decode() , 7 . 1:10 JSON-data-bytesize, PHP- RAM.
JSON , - :
if (strlen($my_json) * 10 > ($my_mb_memory * 1024 * 1024)) {
die ('Decoding this would exhaust the server memory. Sorry!');
}
... $my_json - JSON, $my_mb_memory - , . ( , , intval(ini_get('memory_limit')), .)
, . , , :
- 1-60000, PHP 1 , 10,5 12,5 ( ) 1:12-,
- 1 12000 , 5 ; 1: 5.
- 1 , , 7 , 1: 7.
, . , , ( , ) , json_decode().
, memory_get_usage() / memory_get_peak_usage() , .