php-src/tests/run-test/test008.phpt
Anatol Belski c042c64c43 fix test
This fail has nothing together with any changes in run-tests.php
Using run-tests.php from the 5.5 branch brings the same result. So
merely it is about how PHP7 handles and buffers errors.
2015-08-17 23:12:50 +02:00

31 lines
836 B
PHP

--TEST--
Error message handling (without ZendOpcache)
--SKIPIF--
<?php
!extension_loaded("Zend Opcache") or die("skip Zend Opcache 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'));
$error = 1 / 0;
var_dump($php_errormsg);
?>
--EXPECTF--
string(1) "1"
string(5) "32767"
string(1) "0"
string(1) "1"
string(1) "0"
string(%d) "%sivision by zer%s"