php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #74944 Document Error About "Zip context options"
Submitted: 2017-07-18 06:24 UTC Modified: 2017-07-18 13:11 UTC
From: wangyihanger at gmail dot com Assigned: peehaa (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: ALL
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wangyihanger at gmail dot com
New email:
PHP Version: OS:

 

 [2017-07-18 06:24 UTC] wangyihanger at gmail dot com
Description:
------------
The single quotation marks in the instance program do not match the double quotation marks, resulting in syntax errors

Test script:
---------------
<?php
// Read encrypted archie
$opts = array(
    'zip' => array(
        'password' => 'secret',
    ),
);
// create the context...
$context = stream_context_create($opts);

// ...and use it to fetch the data
echo file_get_contents('zip://test.zip#test.txt", false, $ctx); // The Bug is at here.

?>

Expected result:
----------------
NULL

Actual result:
--------------
PHP Parse error:  syntax error, unexpected end of file in /root/zip.php on line 15

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-07-18 13:10 UTC] peehaa@php.net
Automatic comment from SVN on behalf of peehaa
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=342676
Log: Fixed non matching quotes. Fixes #74944
 [2017-07-18 13:11 UTC] peehaa@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: peehaa
 [2017-07-18 13:11 UTC] peehaa@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 17:00:01 2026 UTC