1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 19:52:20 +02:00
Files
archived-php-src/ext/standard/tests/array/extract_error_variation1.phpt
George Peter Banyard 5fbd49f9ab Convert Errors to ValueErrors
Closes GH-4930
2019-12-05 14:22:54 +01:00

15 lines
320 B
PHP

--TEST--
Test extract() function - error condition - Invalid prefix.
--FILE--
<?php
$a = ["1" => "one", "2" => "two", "3" => "three", "4" => "four", "5" => "five"];
try {
extract($a, EXTR_PREFIX_ALL, '85bogus');
} catch (\ValueError $e) {
echo $e->getMessage();
}
?>
--EXPECT--
Prefix is not a valid identifier