I thought I conveniently could list any contents in a zip file using a glob pattern. But that didn't seem to work. Is there a way?
<?php
$contents = glob('zip://path/to/archive.zip#subdir/*.ext');
var_dump($contents);
The zip:// stream wrapper doesn't seem to return directory contents at all.
scandir('zip://path/to/archive.zip#subdir/'); // array(0){}
The documentation is not too helpful: https://www.php.net/manual/en/wrappers.compression.php