Bug->Doc #70487 [Opn]: pack('x') produces an error
| From: | laruence@php.net | Date: | Mon, 14 Sep 2015 09:37:36 +0000 |
| Subject: | Bug->Doc #70487 [Opn]: pack('x') produces an error | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12747@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: laruence@php.net
Reported by: norbert at linuxnetworks dot de
Summary: pack('x') produces an error
Status: Open
-Type: Bug
+Type: Documentation Problem
Package: Strings related
Operating System: Ubuntu 14.04
PHP Version: 7.0.0RC2
Block user comment: N
Private report: N
New Comment:
change to document issue
Previous Comments:
------------------------------------------------------------------------
[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