php-src/tests/run-test/test008.phpt
Dmitry Stogov 227295a4f1 Unicode stuff is changed according to decision maden on PDM.
Now IS_BINRAY data type is removed and IS_STRING starts behave as IS_BINARY in unicode mode. IS_STRING is incompatible with IS_UNICODE, so ALL functions should be improved to support unicode mode.
2006-01-17 12:18:53 +00:00

43 lines
1.1 KiB
PHP

--TEST--
Error message handling (with ZendOptimizer)
--SKIPIF--
<?php
extension_loaded("Zend Optimizer") or die("skip Zend Optimizer is not loaded");
?>
--FILE--
<?php
// If this test fails ask the developers of run-test.php
//
// We check the general ini settings which affect error handling
// and than verify if a message is given by a division by zero.
// EXPECTF is used here since the error format may change but ut
// should always contain 'Division by zero'.
var_dump(ini_get('display_errors'));
var_dump(ini_get('error_reporting'));
var_dump(ini_get('log_errors'));
var_dump(ini_get('track_errors'));
ini_set('display_errors', 0);
var_dump(ini_get('display_errors'));
var_dump($php_errormsg);
$error = 1 / 0;
var_dump($php_errormsg);
?>
--EXPECTF--
%s: %sivision by zero in %s on line %d
string(1) "1"
string(4) "4095"
string(1) "0"
string(1) "1"
string(1) "0"
string(%d) "%sivision by zer%s"
string(%d) "%sivision by zer%s"
--UEXPECTF--
%s: %sivision by zero in %s on line %d
unicode(1) "1"
unicode(4) "4095"
unicode(1) "0"
unicode(1) "1"
unicode(1) "0"
unicode(%d) "%sivision by zer%s"
unicode(%d) "%sivision by zer%s"