Answers for "zero-cost assertions(1)"

0

zero-cost assertions(1)

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);
Posted by: Guest on June-22-2021

Browse Popular Code Answers by Language