|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-12-20 14:42 UTC] php at lool dot fr
Description: ------------ it is both long to write and difficult to read to have many lines like this in the source code: $value = isset($_POST['blabla']) ? $_POST['blabla'] : 'init_value'; it would be easier to have something like: $value = isnotset($var,'init_value'); PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 18:00:01 2025 UTC |
Userland implementation of said function: function isnotset(&$var, $default) { if (isset($var)) { return $var; } else { return $default; } }