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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC