Bug #70241 [Opn->Nab]: Skipped assertions affect Generator returns

From: Date: Tue, 11 Aug 2015 18:08:00 +0000
Subject: Bug #70241 [Opn->Nab]: Skipped assertions affect Generator returns
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195135@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70241&edit=1 ID: 70241 Updated by: cmb@php.net Reported by: me at kelunik dot com Summary: Skipped assertions affect Generator returns -Status: Open +Status: Not a bug Type: Bug Package: Scripting Engine problem PHP Version: 7.0.0beta3 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: zend.assertions=-1 means don't produce any code, so the script behaves as if there was no assert statement. Previous Comments: ------------------------------------------------------------------------ [2015-08-11 17:58:28] me at kelunik dot com Description: ------------ Assertion configuration can change code behavior: php -d zend.assertions=1 test.php -> Generator php -d zend.assertions=-1 test.php -> bool(true) Test script: --------------- <?php function foo() { assert(yield 42); return true; } var_dump(foo()); Expected result: ---------------- php -d zend.assertions=1 test.php -> Generator php -d zend.assertions=-1 test.php -> Generator Actual result: -------------- php -d zend.assertions=1 test.php -> Generator php -d zend.assertions=-1 test.php -> bool(true) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70241&edit=1

« previous php.bugs (#195135) next »