php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #563 is_int/is_long does not work correctly.
Submitted: 1998-07-21 10:52 UTC Modified: 1998-07-21 13:35 UTC
From: au at hcsd dot de Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.1 OS: Linux 2.0.35
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: au at hcsd dot de
New email:
PHP Version: OS:

 

 [1998-07-21 10:52 UTC] au at hcsd dot de
The functions is_int() and is_long() don't return true if the given argument is a variable:

echo is_int(12345);
--> 1

echo is_int("12345");
--> (nothing returned!!)

$abc = "12345";
echo is_int($abc);
--> (nothing returned!!)

echo is_int("abcdef");
--> (nothing returned!!)

$abc = "abcdef";
echo is_int($abc);
--> (nothing returned!!)

Is this behaviour a bug or a feature?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-07-21 13:35 UTC] rasmus
It isn't returning nothing, it is returning false which is an empty string.  No bug here.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 13:01:35 2025 UTC