RE: [PHP-DEV] [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters

From: Date: Mon, 12 Mar 2012 19:51:09 +0000
Subject: RE: [PHP-DEV] [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Fri, March 9, 2012 5:58 pm, John Crenshaw wrote:
> The reason you have to validate the input type in this case is because
> even though it is a reference, we don't ACTALLY know that it isn't
> supposed to contain an input (even though that would be against all
> sane rules most of the time).

Last time I checked, two consecutive "exec" calls with the same second
argument would append to the array of outputs.

Hey, it's even documented that way:
http://www.php.net/manual/en/function.exec.php

It was unexpected when I first saw it, but seemed perfectly sane to
me, as I suppose somebody might want it, and unset($output); wasn't
exactly horrible to add before each "exec" call.

It would be wise to check other PHP function with references returned
to sanity check your definition of sane :-)

-- 
brain cancer update:
http://richardlynch.blogspot.com/search/label/brain%20tumor
Donate:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE




Thread (46 messages)

« previous php.internals (#58887) next »