1--TEST-- 2assert() - basic - check switch on warnings using assert_options. 3--INI-- 4assert.active = 1 5assert.warning = 0 6assert.callback = f1 7assert.bail = 0 8assert.exception=0 9--FILE-- 10<?php 11function f1() 12{ 13 echo "f1 called\n"; 14} 15 16//switch warning on and test return value 17var_dump($rao=assert_options(ASSERT_WARNING, 1)); 18var_dump($r2=assert(0 != 0)); 19var_dump($r2=assert(0 == 0)); 20 21//switch warning on and test return value 22var_dump($rao=assert_options(ASSERT_WARNING, 0)); 23?> 24--EXPECTF-- 25Deprecated: PHP Startup: assert.warning INI setting is deprecated in Unknown on line 0 26 27Deprecated: PHP Startup: assert.callback INI setting is deprecated in Unknown on line 0 28 29Deprecated: PHP Startup: assert.exception INI setting is deprecated in Unknown on line 0 30 31Deprecated: Constant ASSERT_WARNING is deprecated in %s on line %d 32 33Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d 34int(0) 35f1 called 36 37Warning: assert(): assert(0 != 0) failed in %s on line %d 38bool(false) 39bool(true) 40 41Deprecated: Constant ASSERT_WARNING is deprecated in %s on line %d 42 43Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d 44int(1) 45