# Question: How do you get a zval** in a non-deprecated way?

- Thread: https://externals.io/message/3310
- Original archive: https://news-web.php.net/php.internals/3310
- Started by fuhs@purdue.edu on 2003-07-08T21:33:00+00:00
- Messages: 7
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #3310 — fuhs@purdue.edu — 2003-07-08T21:33:00+00:00

URL: https://externals.io/message/3310#3310

Hello,

I would like to use zend_parse_parameters() to retrieve a zval** but it
currently does not do this. get_parameters() which does return zval**'s has been
deprecated. I don't want to use the '/' option with zend_parse_parameters()
because zval separation may not be necessary, and I would like to avoid it
whenever possible.

Josh

---

## #3313 — Sascha Schumann — 2003-07-08T21:40:53+00:00

URL: https://externals.io/message/3310#3313 · In reply to: #3310

> Hello,
>
> I would like to use zend_parse_parameters() to retrieve a zval** but it
> currently does not do this. get_parameters() which does return zval**'s has been
> deprecated. I don't want to use the '/' option with zend_parse_parameters()
> because zval separation may not be necessary, and I would like to avoid it
> whenever possible.

    The old APIs are not really deprecated.  The new APIs are
    simply recommended over the old ones.  So, if you are running
    into a case where zend_get_parameters works better for you,
    go ahead and use it.

    - Sascha

---

## #3315 — fuhs@purdue.edu — 2003-07-08T21:58:24+00:00

URL: https://externals.io/message/3310#3315 · In reply to: #3313

Ok, thanks.

Is there a reason why this functionality is not supported in the new API?

Josh

Quoting Sascha Schumann <sascha@schumann.cx>:

> 
> 
> > […]
> been
> > […]
> zend_parse_parameters()
> > […]
> 
>     The old APIs are not really deprecated.  The new APIs are
>     simply recommended over the old ones.  So, if you are running
>     into a case where zend_get_parameters works better for you,
>     go ahead and use it.
> 
>     - Sascha

---

## #3319 — fuhs@purdue.edu — 2003-07-08T23:27:31+00:00

URL: https://externals.io/message/3310#3319

Second time around.

This patch would add a 'Z' flag to zend_parse_parameters*().

Example:

    #typdef zvar zval**

    zvar a_zvar;

    zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &zvar);

---

## #3320 — fuhs@purdue.edu — 2003-07-09T00:05:18+00:00

URL: https://externals.io/message/3310#3320

One more time. I hope it's not too obvious that I'm new at this :)

This patch would add a 'Z' flag to zend_parse_parameters*().

Example:
    #typdef zvar zval**
    zvar a_zvar;
    zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &zvar);

Josh

---

## #3321 — Jon Parise — 2003-07-09T03:15:02+00:00

URL: https://externals.io/message/3310#3321 · In reply to: #3320

> One more time. I hope it's not too obvious that I'm new at this :)
> 
> This patch would add a 'Z' flag to zend_parse_parameters*().
> 
> Example:
>     #typdef zvar zval**
>     zvar a_zvar;
>     zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &zvar);
                                                             ^^^^
That should be &a_var, right?

> @@ -471,7 +480,7 @@ static int zend_parse_va_args(int num_ar
>  			case 's': case 'b':
>  			case 'r': case 'a':
>  			case 'o': case 'O':
> -			case 'z':
> +		        case 'z': case 'Z':
>  				max_num_args++;
>  				break;
  
It looks like you have an extra tab in front of that new 'case'.

-- 
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

---

## #3706 — Andrei Zmievski — 2003-08-03T16:41:40+00:00

URL: https://externals.io/message/3310#3706

> I had asked about this before, but I ran into some kind of confirmation thing
> and the discussion stopped.
> 
> This patch would add a 'Z' flag to zend_parse_parameters*(). 
> 
> Example:
> 
>     #typdef zvar zval**
> 
>     zvar a_zvar;
> 
>     zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &zvar);

First off, what do you need access to zval** for, exactly?

-Andrei

A room without books is like a body without a soul.
                  -- Marcus Tullius Cicero (106-43 B.C.)
