On 15 Apr 2004 at 11:47, Jason Garber wrote:

> a. the actual variable in question could not be passed

This is wrong, too. Look at this example:

<?php
error_reporting(E_ALL | E_STRICT);

function param(&$param, $default, $type = null)
{
    if (!isset($param)) {
        $param = $default;
    }
    if (is_string($type)) {
        settype($param, $type);
    }
}

$_GET['Exists'] = 0;

param($_GET['Exists'], 1, 'string');
param($_GET['Does']['Not']['Exist'], 1, 'double');

var_dump($_GET);
?>

Output:
----------------------------------------
array(2) {
  ["Exists"]=>
  string(1) "0"
  ["Does"]=>
  array(1) {
    ["Not"]=>
    array(1) {
      ["Exist"]=>
      float(1)
    }
  }
}

Exactly the behavior you are looking for. Not even an E_NOTICE.

-- 
Ferdinand Beyer
<[EMAIL PROTECTED]>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to