Re[2]: [PHP-DEV] New construct discussion Summary

From: Date: Mon, 12 Jul 2004 02:36:24 +0000
Subject: Re[2]: [PHP-DEV] New construct discussion Summary
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-11102@lists.php.net to get a copy of this message
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'] : 1)) MR> becomes MR> $level = value($_SESSION['level'], $_REQUEST['level'], 1, INT); MR> Of course, I have no idea how feasible this is. MR> Marc 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); -- Best regards, Jason mailto:jason@ionzoft.com

« previous php.internals (#11102) next »