mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
de77344de2
Errors related to invalid format strings (unlike data mismatch errors) should throw ValueError. Closes GH-6185.
15 lines
216 B
PHP
15 lines
216 B
PHP
--TEST--
|
|
Test unpack() function : error conditions
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
var_dump(unpack("B", pack("I", 65534)));
|
|
} catch (ValueError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Invalid format type B
|