Doc #70487 [Asn->Csd]: pack('x') produces an error
| From: | nikic@php.net | Date: | Mon, 14 Sep 2015 13:05:02 +0000 |
| Subject: | Doc #70487 [Asn->Csd]: pack('x') produces an error | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12748@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70487&edit=1
ID: 70487
Updated by: nikic@php.net
Reported by: norbert at linuxnetworks dot de
Summary: pack('x') produces an error
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Strings related
Operating System: Ubuntu 14.04
PHP Version: 7.0.0RC2
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ab74d802473c10c9f9a61f75ba6443de9a958e4b
Log: Fix bug #70487
Previous Comments:
------------------------------------------------------------------------
[2015-09-14 09:37:36] laruence@php.net
change to document issue
------------------------------------------------------------------------
[2015-09-14 09:04:08] norbert at linuxnetworks dot de
Description:
------------
Due to a recent change, pack('x') generates the following error in 7.0 only:
pack() expects at least 2 parameters, 1 given
Changing it to pack('x', null) generates another error:
Unused parameter
Test script:
---------------
<?php
echo pack('x');
echo pack('x', null);
Expected result:
----------------
A NULL byte
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70487&edit=1