On Sun, 11 Jul 2004, Jason Garber wrote:
> The concept is desirable, but can be achieved if you need it just as
> simply using already available syntax (ie a cast):
>
> $level = (integer) value($_SESSION['level'], 1);
The problem with that is this:
$level = (int) value($_SESSION['level');
Assu
Hello,
RL> $a = value($_GET['index'], $default);
value() sounds like more like a "language construct" to me. I'm not
sure if it accurately conveys the meaning though (not that it has
stopped other functions from being added in the past :)
--
Best regards,
Jasonm
Hello Marc,
MR> I don't think a function named param() really fits, but I do like the
MR> idea of adding a type check (or in the case of PHP a type cast) to the
MR> function.
MR> $level = (int) (isset($_SESSION['level']) ? $_SESSION['level'] :
MR> (isset($_REQUEST['level']) ? $_REQUEST['level']