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 975133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:32:11+00:00 2026-05-16T03:32:11+00:00

It is possible to fetch the zend resources ( zend_fetch_resource ) without knowing the

  • 0

It is possible to fetch the zend resources (zend_fetch_resource) without knowing the type of the fetching resource? If so, how?

Note: I am writing PHP extension.

  • 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-16T03:32:12+00:00Added an answer on May 16, 2026 at 3:32 am

    Yes, you can.

    zend_fetch_resource won’t work because it receives the the types of resources that are acceptable and fails if the found one is not one of those.

    Just use

    void *zend_list_find(int id, int *type);
    

    From the resource zval you can extract the id with Z_RESVAL(zval). The argument type will be filled with the type of the resource found.

    However, I don’t see much usage for this, except maybe to create a var_dump clone. The problem is that once you retrieve an arbitrary resource, what are you going to do with it?… In general, you know nothing about the returned data structure.

    You can get the name of the resource directly with:

    char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to fetch the current application version programmatically for use in urls
Is it possible to have a MySQLi prepared statement within the fetch() call of
Is it possible to fetch pages with urllib2 through a SOCKS proxy on a
i was wondering if it was possible to fetch a list of a user's
Im using the following PHP and MySql to fetch rows from a table, $search_word=$_GET['search_word'];
I am writing a query to fetch results for all the values in a
Is it possible to fetch a System.Windows.Forms.ContextMenu instance from a handle? By fetch I
Is it possible to fetch only the month part from a sql date entry?
Is it possible to fetch records in parts? Following will return 10,000 rows from
Possible Duplicate: “Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given” error while

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.