php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31611 Different results by checking for isset($string->foo)
Submitted: 2005-01-19 16:56 UTC Modified: 2005-01-19 18:02 UTC
From: sa at ventigo dot com Assigned:
Status: Closed Package: CGI/CLI related
PHP Version: 5.0.3 OS: Gentoo Linux
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: sa at ventigo dot com
New email:
PHP Version: OS:

 

 [2005-01-19 16:56 UTC] sa at ventigo dot com
Description:
------------
The problem is in the different results of isset() in different versions of PHP.
I have tested it with compiled in SPL Support and vithout SPL support; the problem is always the same.

Reproduce code:
---------------
#!/usr/bin/php
<?php

$blah = 'ABC';

var_dump($blah, $blah->foo, isset($blah->foo));

?>

Expected result:
----------------
I get this Result in following versions of PHP:
 - PHP 5.0.0 as Apache Module
 - PHP 5.0.3 as Apache Module
 - PHP 5.0.0 CLI

string(3) "ABC"
NULL
bool(false)


Actual result:
--------------
This is the result in PHP 5.0.3 CLI (With and without SPL support)

string(3) "ABC"
NULL
bool(true)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-19 18:02 UTC] sa at ventigo dot com
In the current dev-version the problem doesn't occur. 

Okay, Thanks
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 21:01:35 2025 UTC