1--TEST-- 2assert() - basic - check that assert runs when assert.active is set to 1. 3--INI-- 4assert.active = 1 5assert.warning = 0 6assert.callback = f1 7assert.bail = 0 8assert.quiet_eval = 0 9--FILE-- 10<?php 11function f1() 12{ 13 echo "f1 called\n"; 14} 15//String assert 16$sa = "0 != 0"; 17var_dump($r2=assert($sa)); 18$sa = "0 == 0"; 19var_dump($r2=assert($sa)); 20 21//Non string assert 22var_dump($r2=assert(0)); 23var_dump($r2=assert(1)); 24--EXPECTF-- 25Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d 26f1 called 27bool(false) 28 29Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d 30bool(true) 31f1 called 32bool(false) 33bool(true) 34