Edit report at https://bugs.php.net/bug.php?id=75950&edit=1
ID: 75950
Comment by: pslacerda+php at gmail dot com
Reported by: xmlscript at gmail dot com
Summary: when zend.assertions=-1, and assert(sleep(5));
assertions is NOT zero-cost.
Status: Open
Type: Bug
Package: Scripting Engine problem
Operating System: Fedora 27
PHP Version: 7.2.2
Block user comment: N
Private report: N
New Comment:
I couldn't reproduce this error.
Previous Comments:
------------------------------------------------------------------------
[2018-02-11 08:43:32] xmlscript at gmail dot com
<?php
/**
* php-fpm 7.2.2
* zend.assertions = -1
*/
var_dump( ini_get('zend.assertions') ); // return -1
assert_options(ASSERT_ACTIVE, false);
assert( 'sleep(5)' ); //with string, assertion code will not be generated, and throwed
an "Deprecated: assert(): Calling assert() with a string argument is deprecated in ..."
assert( sleep(5) ); //really waited for 5 seconds, is NOT assertions zero-cost. :(
?>
------------------------------------------------------------------------
[2018-02-11 08:37:45] xmlscript at gmail dot com
Description:
------------
<?php
/**
* php-fpm 7.2.2
* zend.assertions = -1
*/
var_dump( ini_get('zend.assertions') ); // return -1
assert_options(ASSERT_ACTIVE, true);
assert( 'sleep(5)' ); //with string, assertion code will not be generated, and throwed
an "Deprecated: assert(): Calling assert() with a string argument is deprecated in ..."
assert( sleep(5) ); //really waited for 5 seconds, is NOT assertions zero-cost. :(
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75950&edit=1