1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Files
archived-php-src/ext/standard/tests/general_functions/bug44295.phpt
T
Máté Kocsis d1764ca330 Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00

30 lines
825 B
PHP

--TEST--
user defined error handler + set_error_handling(EH_THROW)
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == "WIN") die("skip Not for Windows");
if (is_dir('/this/path/does/not/exist')) die("skip directory /this/path/does/not/exist already exists");
?>
--FILE--
<?php
$dir = '/this/path/does/not/exist';
set_error_handler('my_error_handler');
function my_error_handler() {$a = func_get_args(); print "in error handler\n"; }
try {
print "before\n";
$iter = new DirectoryIterator($dir);
print get_class($iter) . "\n";
print "after\n";
} catch (Exception $e) {
print "in catch: ".$e->getMessage()."\n";
}
?>
==DONE==
<?php exit(0); ?>
--EXPECT--
before
in catch: DirectoryIterator::__construct(/this/path/does/not/exist): Failed to open directory: No such file or directory
==DONE==