php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jball606 at gmail dot com
New email:
PHP Version: OS:

 

 [2011-03-18 12:42 UTC] jball606 at gmail dot com
Description:
------------
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

Patches

Pull Requests

History

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: Sat Dec 21 18:01:29 2024 UTC