@@ -430,21 +430,20 @@ static zval* accelerator_get_scripts(TSRMLS_D)
430
430
return return_value ;
431
431
}
432
432
433
- /* {{{ proto array accelerator_get_status()
434
- Obtain statistics information regarding code acceleration in the Zend Performance Suite */
433
+ /* {{{ proto array accelerator_get_status([bool fetch_scripts] )
434
+ Obtain statistics information regarding code acceleration */
435
435
static ZEND_FUNCTION (opcache_get_status )
436
436
{
437
437
long reqs ;
438
438
zval * memory_usage ,* statistics ,* scripts ;
439
+ zend_bool fetch_scripts = 1 ;
439
440
440
441
/* keep the compiler happy */
441
442
(void )ht ; (void )return_value_ptr ; (void )this_ptr ; (void )return_value_used ;
442
443
443
- #if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO
444
- if (zend_parse_parameters_none () == FAILURE ) {
445
- RETURN_FALSE ;
444
+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "|b" , & fetch_scripts ) == FAILURE ) {
445
+ return ;
446
446
}
447
- #endif
448
447
449
448
if (!accel_startup_ok ) {
450
449
RETURN_FALSE ;
@@ -480,10 +479,12 @@ static ZEND_FUNCTION(opcache_get_status)
480
479
add_assoc_double (statistics , "opcache_hit_rate" , reqs ?(((double ) ZCSG (hits ))/reqs )* 100.0 :0 );
481
480
add_assoc_zval (return_value , "opcache_statistics" , statistics );
482
481
483
- /* accelerated scripts */
484
- scripts = accelerator_get_scripts (TSRMLS_C );
485
- if (scripts ) {
486
- add_assoc_zval (return_value , "scripts" , scripts );
482
+ if (fetch_scripts ) {
483
+ /* accelerated scripts */
484
+ scripts = accelerator_get_scripts (TSRMLS_C );
485
+ if (scripts ) {
486
+ add_assoc_zval (return_value , "scripts" , scripts );
487
+ }
487
488
}
488
489
}
489
490
@@ -494,7 +495,7 @@ static int add_blacklist_path(zend_blacklist_entry *p, zval *return_value TSRMLS
494
495
}
495
496
496
497
/* {{{ proto array accelerator_get_configuration()
497
- Obtain configuration information for the Zend Performance Suite */
498
+ Obtain configuration information */
498
499
static ZEND_FUNCTION (opcache_get_configuration )
499
500
{
500
501
zval * directives ,* version ,* blacklist ;
0 commit comments