Description of problem: The php ini option zend.assertions differs from upstream in the Fedora build. Upstream has a backwards compatible value of 0 so that assert() gets compiled and executed. The present rawhide build has a value of -1 so any assert() is not even compiled. This change is not documented on the F25 changeset and breaks any application or testsuite using assert() to validate data before acting on it. Version-Release number of selected component (if applicable): php-cli-7.0.9-0.1.RC1.fc25.x86_64 How reproducible: always Steps to Reproduce: 1. Reduced sample: <?php $testvar="a"; assert('is_bool($testvar)'); print "this is a test\n"; 2. php test.php 3. php -n test.php Actual results: this is a test Expected results: Warning: assert(): Assertion "is_bool($testvar)" failed in /root/test.php on line 5 this is a test Additional info: According to the RFC that implemented the zend.assertions change for PHP7 the defaults are to be backwards compatible with PHP5 code, and to go to PHP7 only mode an application should actively change the parameters. https://github.com/tpunt/PHP7-Reference#expectations https://wiki.php.net/rfc/expectations Note that this is a breaking change from previous and any application that uses assert() to verify something before acting on it will be broken by the deviation from upstream in this. This will also serve to confuse those who have read up on PHP7 changes in preparation for F25 and this undocumented deviation from upstream will cause unexpected behaviour where PHP libraries test against upstream defaults with tools like Travis CI. Please document a workaround for libraries that make use of assertions - particularly in their test suites - or preferably revert to match the upstream defaults.
Default upstream value for "production" is -1, so this is expected. [Assertion] ; Switch whether to compile assertions at all (to have no overhead at run-time) ; -1: Do not compile at all ; 0: Jump over assertion at run-time ; 1: Execute assertions ; Changing from or[Assertion] ; Switch whether to compile assertions at all (to have no overhead at run-time) ; -1: Do not compile at all ; 0: Jump over assertion at run-time ; 1: Execute assertions ; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1) ; Default Value: 1 ; Development Value: 1 ; Production Value: -1 ; http://php.net/zend.assertions zend.assertions = -1 to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1) ; Default Value: 1 ; Development Value: 1 ; Production Value: -1 ; http://php.net/zend.assertions zend.assertions = -1 Sorry, but I don't think we should change this value, as we always use php.ini-production as a template for our php.ini You still can use -d zend.assertions=1 at runtime
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'.