Zero Cost Assertions2

[Solved] Zero Cost Assertions2 | Solidity - Code Explorer | yomemimo.com
Question : zero-cost assertions(1)

Answered by : disturbed-dugong-aqv81pl3r81n

function test($arg) { assert($arg > 20 && $arg < 110, "$arg is invalid");
}
ini_set('zend.assertions',0); test(16);
ini_set('zend.assertions',1); test(17);
ini_set('assert.exception',1); test(18);

Source : http://talks.php.net/confoo16#/php7assert | Last Update : Tue, 29 Jun 21

Question : zero-cost assertions(2)

Answered by : disturbed-dugong-aqv81pl3r81n

; Completely skip compiling assert() calls
; (can only be set in php.ini)
zend.assertions = -1

Source : http://talks.php.net/confoo16#/php7assert | Last Update : Tue, 29 Jun 21

Answers related to zero cost assertions2

Code Explorer Popular Question For Solidity