|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54307 isset && is_numeric
Submitted: 2011-03-18 12:42 UTC Modified: 2011-03-19 14:08 UTC
From: jball606 at gmail dot com Assigned:
Status: Closed Package: Output Control
PHP Version: 5.3.6 OS: *nix & windows
Private report: No CVE-ID: None
 [2011-03-18 12:42 UTC] jball606 at gmail dot com
I would kill for a way to do isset && check if the value is s specific data type such as numeric.  My code is loaded with if(isset($a) && is_numeric($a)).  It would be nice to do that in a single function (isset($a,[is_numeric])).

Thank you taking the time to read my request.

Expected result:
$var = isset($a,[is_numeric]);

$var = true,false

Actual result:
$var = isset($a,[is_numeric]);

$var = true,false


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-19 14:08 UTC] jball606 at gmail dot com
I learned you can bypass the warning with the reference to a variable

function bob(&$fred)

wont give me the notice of undefined variable.  My Bad.
 [2011-03-19 14:08 UTC] jball606 at gmail dot com
-Status: Open +Status: Closed
 [2011-03-19 14:08 UTC] jball606 at gmail dot com
Want to close
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 17 02:01:30 2024 UTC