1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 20:22:36 +02:00
Files
archived-php-src/ext/standard/tests/strings/unpack_error.phpt
2019-03-11 11:32:20 +01:00

26 lines
622 B
PHP

--TEST--
Test unpack() function : error conditions
--FILE--
<?php
/* Prototype : array unpack ( string $format , string $data )
* Description: Unpack data from binary string
* Source code: ext/standard/pack.c
*/
echo "*** Testing unpack() : error conditions ***\n";
echo "\n-- Testing unpack() function with invalid format character --\n";
$extra_arg = 10;
var_dump(unpack("B", pack("I", 65534)));
?>
===DONE===
--EXPECTF--
*** Testing unpack() : error conditions ***
-- Testing unpack() function with invalid format character --
Warning: unpack(): Invalid format type B in %s on line %d
bool(false)
===DONE===