Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6838263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:34:33+00:00 2026-05-26T23:34:33+00:00

After a little testing/scripting/playing with PHP 5.3 PHAR archives, I discovered some problems. glob

  • 0

After a little testing/scripting/playing with PHP 5.3 PHAR archives, I discovered some problems.

glob

PHAR doesn’t work with glob. Neither as wrapper (http://www.php.net/manual/en/phar.using.stream.php#104320) nor as a function call.

In my test project I had to iterate over the files in the PHAR and filter the result by a glob-equivalent regular expression.

imagettfbbox

I have no idea why, but imagettfbbox also doesn’t understand the PHAR stream wrapper.

The easiest solution here, was to extract the file via copy(). (PHAR::extractTo return with an exception without a stacktrace nor a line number.)

Are there other surprises, which I should expect? Are there other known issues? And are they documented anywhere?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:34:33+00:00Added an answer on May 26, 2026 at 11:34 pm

    glob: I don’t think that glob supports streams, so this won’t be specific to phar:// but any stream wrapper.

    imagettfbbox: I think this is the same, no support for stream wrappers, but only bare files.

    There are other functions, you encounter the same, too. For example the ZIP class can’t handle streams as well.

    And not all stream wrapper support stream wrapper stacking, e.g. one wrapper operating on another.

    Feel free to open feature requests in the php bugtracker and/or support the PHP development to introduce better stream support for the components you need it for.

    Loosely related: In memory download and extract zip archive

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have philosophised about the purpose of stack a little bit and after some
I've trying to get some vertical text on a little test webpage after reading
While testing some scripts, I've noticed, if expiration time is little (not zero) -
After some testing with a completed product, I have just found that the hardware
I got a little curious after reading this /. article over hijacking HTTPS cookies.
After trying my hand at Perl and a little bit of C, I am
After building the application GUI, I realised it was a little bit too complex
I'm programming a little game, and I set the lpfnWndProc to DefWindowProc and after
After learning about TDD and unit testing, I'm really looking to write tests when
Hallo all, I just start my carrier after graduation. My first testing task is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.