# Quick question...

- Thread: https://externals.io/message/2186
- Original archive: https://news-web.php.net/php.internals/2186
- Started by Lars Torben Wilson on 2003-06-05T21:01:28+00:00
- Messages: 4
- 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

---

## #2187 — Sterling Hughes — 2003-06-05T21:00:08+00:00

URL: https://externals.io/message/2186#2187 · In reply to: #2186

Yep.

-Sterling


> Just wanted to check that I'm reading this right before committing
> to the docs: does print() return 1, always? The following seems to
> indicate so:
> 
> case ZEND_PRINT:
> 	zend_print_variable(get_zval_ptr(&EX(opline)->op1, EX(Ts), 
>                             &EG(free_op1), BP_VAR_R));
> 	EX(Ts)[EX(opline)->result.u.var].tmp_var.value.lval = 1;
> 	EX(Ts)[EX(opline)->result.u.var].tmp_var.type = IS_LONG;
> 	FREE_OP(EX(Ts), &EX(opline)->op1, EG(free_op1));
> 	NEXT_OPCODE();
> 
> 
> Thanks,
> 
> Torben
> 
> -- 
>  Torben Wilson <torben@php.net>                        +1.604.709.0506
>  http://www.thebuttlesschaps.com          http://www.inflatableeye.com
>  http://www.hybrid17.com                  http://www.themainonmain.com
>  -----==== Boycott Starbucks!  http://www.haidabuckscafe.com ====-----
> 
-- 
"Whether you think you can or think you can't -- you are right." 
    - Henry Ford

---

## #2186 — Lars Torben Wilson — 2003-06-05T21:01:28+00:00

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

Just wanted to check that I'm reading this right before committing
to the docs: does print() return 1, always? The following seems to
indicate so:

case ZEND_PRINT:
	zend_print_variable(get_zval_ptr(&EX(opline)->op1, EX(Ts), 
                            &EG(free_op1), BP_VAR_R));
	EX(Ts)[EX(opline)->result.u.var].tmp_var.value.lval = 1;
	EX(Ts)[EX(opline)->result.u.var].tmp_var.type = IS_LONG;
	FREE_OP(EX(Ts), &EX(opline)->op1, EG(free_op1));
	NEXT_OPCODE();


Thanks,

Torben

-- 
 Torben Wilson <torben@php.net>                        +1.604.709.0506
 http://www.thebuttlesschaps.com          http://www.inflatableeye.com
 http://www.hybrid17.com                  http://www.themainonmain.com
 -----==== Boycott Starbucks!  http://www.haidabuckscafe.com ====

---

## #2188 — Lars Torben Wilson — 2003-06-05T21:07:13+00:00

URL: https://externals.io/message/2186#2188 · In reply to: #2187

> Yep.
> 
> -Sterling
> 
> 
> > […]


Thanks!


Torben


-- 
 Torben Wilson <torben@php.net>                        +1.604.709.0506
 http://www.thebuttlesschaps.com          http://www.inflatableeye.com
 http://www.hybrid17.com                  http://www.themainonmain.com
 -----==== Boycott Starbucks!  http://www.haidabuckscafe.com ====

---

## #2256 — Andi Gutmans — 2003-06-09T17:01:19+00:00

URL: https://externals.io/message/2186#2256 · In reply to: #2186

At 05:00 PM 6/5/2003 -0400, Sterling Hughes wrote:
>Yep.
>
>-Sterling
>
>
> > […]

Hmm, it could actually be changed to return bool(true). Maybe we kept it 
like this for PHP 3 compatibility but we can change it for PHP 5 IMO 
because I doubt ppl use the return value as a number.

Andi
