Last active
April 23, 2019 07:07
-
-
Save coudenysj/22034a6b7c59a9e61771d6e764254637 to your computer and use it in GitHub Desktop.
A small script to return PHP stats in JSON format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-Type: application/json'); | |
echo json_encode( | |
[ | |
'opcache' => opcache_get_status(), | |
'realpath_cache_size' => [ | |
'configured' => ini_get('realpath_cache_size'), | |
'real' => realpath_cache_size(), | |
] | |
], | |
JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment