php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63069 GLOB_NOCHECK Results
Submitted: 2012-09-12 05:34 UTC Modified: 2013-02-18 00:35 UTC
From: bhsmither at gmail dot com Assigned:
Status: No Feedback Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-09-12 05:34 UTC] bhsmither at gmail dot com
Description:
------------
glob() function
http://us3.php.net/manual/en/function.glob.php

Documentation says:
"GLOB_NOCHECK - Return the search pattern if no files matching it were found."

Tests indicate that the search pattern is not returned 'verbatim', but rather an array (with wildcard characters in place) with each array element representing one possible combination of braced options, the whole array having all possible combinations.

Test script:
---------------
<?php
$language='L:\WebServer\htdocs\language\es-ES';
$qqq=glob(' with '.$language.'{-custom,-normal}.xml', GLOB_BRACE | GLOB_NOCHECK);
print_r($qqq);
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-13 02:46 UTC] googleguy@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

I can not reproduce your problem.

<?php
$language='L:\WebServer\htdocs\language\es-ES';
$qqq=glob(' with '.$language.'{-custom,-normal}.xml', GLOB_BRACE | 
GLOB_NOCHECK);
print_r($qqq);
?>

This returns:


Array
(
    [0] =>  with L:\WebServer\htdocs\language\es-ES{-custom,-normal}.xml
)


For me, which is the expected output according to the documentation. Can you 
please provide the output you get and include which version of PHP you're using 
and on what Operating System Software.

Thanks.
 [2012-09-13 02:46 UTC] googleguy@php.net
-Status: Open +Status: Feedback
 [2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 [2013-02-24 20:52 UTC] bhsmither at gmail dot com
This is my result on two different installations:
Array
(
    [0] =>  with L:\WebServer\htdocs\language\es-ES-custom.xml
    [1] =>  with L:\WebServer\htdocs\language\es-ES-normal.xml
)


PHP 5.4.4 on Windows XP SP3
Build Date 	Jun 13 2012 21:17:57
Compiler 	MSVC9 (Visual C++ 2008)
Architecture 	x86
Server API 	CGI/FastCGI
PHP API 	20100412
PHP Extension 	20100525
Zend Extension 	220100525
Zend Extension Build 	API220100525,TS,VC9
PHP Extension Build 	API20100525,TS,VC9
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.0, Copyright (c) 2002-2012, by Derick Rethans


PHP 5.3.5 on Windows Server 2003 R2 SP2
Build Date 	Jan 6 2011 17:50:45
Compiler 	MSVC6 (Visual C++ 6.0)
Architecture 	x86
Server API 	Apache 2.0 Handler
PHP API 	20090626
PHP Extension 	20090626
Zend Extension 	220090626
Zend Extension Build 	API220090626,TS,VC6
PHP Extension Build 	API20090626,TS,VC6
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.0.7, Copyright (c) 2002-2011, by ionCube Ltd., and
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 01:01:33 2019 UTC