version_check.php
30 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 4 | |
| 5 | /* |
| 6 | Check for PHP CLI results |
| 7 | */ |
| 8 | if (defined('STDIN') || (defined('PHP_SAPI') && PHP_SAPI == 'cli') || php_sapi_name() === 'cli') { |
| 9 | |
| 10 | // PHP CLI Version |
| 11 | echo @phpversion() . "\n"; |
| 12 | |
| 13 | // PHP CLI Memory limit for PHP CLI |
| 14 | echo @ini_get('memory_limit') . "\n"; |
| 15 | |
| 16 | // PHP CLI Max execution time |
| 17 | echo @ini_get('max_execution_time') . "\n"; |
| 18 | |
| 19 | // Change PHP_INI values |
| 20 | @ini_set('memory_limit', '512M'); |
| 21 | @ini_set('max_execution_time', '0'); |
| 22 | |
| 23 | // Modified PHP CLI Memory limit for PHP CLI |
| 24 | echo @ini_get('memory_limit') . "\n"; |
| 25 | |
| 26 | // Modified PHP CLI Max execution time |
| 27 | echo @ini_get('max_execution_time'); |
| 28 | |
| 29 | } |
| 30 |