Doc #63069 [Opn->Fbk]: GLOB_NOCHECK Results

From: Date: Thu, 13 Sep 2012 02:46:18 +0000
Subject: Doc #63069 [Opn->Fbk]: GLOB_NOCHECK Results
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8855@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63069&edit=1 ID: 63069 Updated by: googleguy@php.net Reported by: bhsmither at gmail dot com Summary: GLOB_NOCHECK Results -Status: Open +Status: Feedback Type: Documentation Problem Package: Documentation problem Operating System: Irrelevant PHP Version: Irrelevant Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2012-09-12 05:34:08] 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); ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63069&edit=1

« previous php.doc.bugs (#8855) next »