Doc #72394 [Opn]: PharData's limitations are not listed.

From: Date: Mon, 13 Jun 2016 11:24:45 +0000
Subject: Doc #72394 [Opn]: PharData's limitations are not listed.
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13505@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72394&edit=1 ID: 72394 User updated by: forums at artfulrobot dot uk Reported by: forums at artfulrobot dot uk -Summary: PhpData's limitations are not listed. +Summary: PharData's limitations are not listed. Status: Open Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: oops, wrong name in title Previous Comments: ------------------------------------------------------------------------ [2016-06-13 11:24:08] forums at artfulrobot dot uk Description: ------------ --- From manual page: http://www.php.net/class.phardata --- This fails to iterate certain Tar files, see example below. If this is a by-design limitation it should be noted. Test script: --------------- #!/bin/bash # Create a tar file. mkdir -p orig-dir/subdir; touch orig-dir/{a,b,subdir/c}; cd orig-dir tar czf ../test.tgz ./; cd ../ # PHP <?php $a = new PharData('test.tgz', RecursiveDirectoryIterator::SKIP_DOTS); print count($a) . " files\n"; foreach (new RecursiveIteratorIterator($a) as $path => $fileinfo) { print " " . $path . "\n"; // never runs. } Expected result: ---------------- 3 files phar:///some/path/./a phar:///some/path/./b phar:///some/path/./subdir/c Actual result: -------------- 5 files ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72394&edit=1

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