forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix tests if Zend Optimizer is loaded
- Loading branch information
Derick Rethans
committed
Jan 1, 2003
1 parent
9b09ba6
commit 6197460
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--TEST-- | ||
Error message handling (with ZendOptimizer) | ||
--SKIPIF-- | ||
<?php | ||
extension_loaded("Zend Optimizer") or die("skip Zend Optimizer is 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) "2047" | ||
string(1) "0" | ||
string(1) "1" | ||
string(1) "0" | ||
string(%d) "%sivision by zer%s" | ||
string(%d) "%sivision by zer%s" |