xref: /PHP-7.0/tests/run-test/test005.phpt (revision 69dbfa8e)
1--TEST--
2Error message handling (with ZendOpcache)
3--SKIPIF--
4<?php
5extension_loaded("Zend Opcache") or die("skip Zend Opcache is not loaded");
6?>
7--FILE--
8<?php
9// If this test fails ask the developers of run-test.php
10//
11// We check the general ini settings which affect error handling
12// and than verify if a message is given by a division by zero.
13// EXPECTF is used here since the error format may change but ut
14// should always contain 'Division by zero'.
15var_dump(ini_get('display_errors'));
16var_dump(ini_get('error_reporting'));
17var_dump(ini_get('log_errors'));
18var_dump(ini_get('track_errors'));
19ini_set('display_errors', 0);
20var_dump(ini_get('display_errors'));
21var_dump($php_errormsg);
22$zero = 0;
23$error = 1 / $zero;
24var_dump($php_errormsg);
25?>
26--EXPECTF--
27string(1) "1"
28string(5) "32767"
29string(1) "0"
30string(1) "1"
31string(1) "0"
32NULL
33string(%d) "%sivision by zer%s"
34