# changed behavior: property of a string

- Thread: https://externals.io/message/14112
- Original archive: https://news-web.php.net/php.internals/14112
- Started by Daniel Convissor on 2004-12-19T19:06:21+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #14112 — Daniel Convissor — 2004-12-19T19:06:21+00:00

URL: https://externals.io/message/14112#14112

Hi:

Someone using PEAR DB just filed a bug report.  It turns out PHP's 
behavior has changed when trying to find a "property" of a string:

    php -r "$str = 'Hello'; var_dump(isset($str->prop));"

In 5.0.0, 5.0.1 and 5.0.2 it returns false.  But in 5.0.3 it returns true.

In a PHP 4 snapshot from today, it still returns false, as it always has.

This behavior changed in HEAD some time between 2004-10-31 and 2004-12-16.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

---

## #14113 — Daniel Convissor — 2004-12-20T00:13:39+00:00

URL: https://externals.io/message/14112#14113 · In reply to: #14112

> 
>     php -r "$str = 'Hello'; var_dump(isset($str->prop));"

Those on *nix like systems would probably rather use this:

      php -r '$str = "Hello"; var_dump(isset($str->prop));'


> In a PHP 4 snapshot from today, it still returns false, as it always has.

Uh, ignore that statement.  Now that I think about it, my test used PHP 5, 
not 4.  (PATH intercepted the command despite being in the php4 
directory.)  I'll test PHP 4 later.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

---

## #14114 — Daniel Convissor — 2004-12-20T01:24:07+00:00

URL: https://externals.io/message/14112#14114 · In reply to: #14113

Hi:

Someone mentioned http://bugs.php.net/bug.php?id=31098 deals with this 
issue.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

---

## #14151 — Andi Gutmans — 2004-12-22T05:25:33+00:00

URL: https://externals.io/message/14112#14151 · In reply to: #14112

Will look into it.
Thanks.

At 02:06 PM 12/19/2004 -0500, Daniel Convissor wrote:
>Hi:
>
>Someone using PEAR DB just filed a bug report.  It turns out PHP's
>behavior has changed when trying to find a "property" of a string:
>
>     php -r "$str = 'Hello'; var_dump(isset($str->prop));"
>
>In 5.0.0, 5.0.1 and 5.0.2 it returns false.  But in 5.0.3 it returns true.
>
>In a PHP 4 snapshot from today, it still returns false, as it always has.
>
>This behavior changed in HEAD some time between 2004-10-31 and 2004-12-16.
>
>--Dan
>
>--
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>             data intensive web and database programming
>                 http://www.AnalysisAndSolutions.com/
>  4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

---

## #14162 — Andi Gutmans — 2004-12-22T22:10:32+00:00

URL: https://externals.io/message/14112#14162 · In reply to: #14112

We found the bug. Do you think this warrants a 5.0.4?

Andi

At 02:06 PM 12/19/2004 -0500, Daniel Convissor wrote:
>Hi:
>
>Someone using PEAR DB just filed a bug report.  It turns out PHP's
>behavior has changed when trying to find a "property" of a string:
>
>     php -r "$str = 'Hello'; var_dump(isset($str->prop));"
>
>In 5.0.0, 5.0.1 and 5.0.2 it returns false.  But in 5.0.3 it returns true.
>
>In a PHP 4 snapshot from today, it still returns false, as it always has.
>
>This behavior changed in HEAD some time between 2004-10-31 and 2004-12-16.
>
>--Dan
>
>--
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>             data intensive web and database programming
>                 http://www.AnalysisAndSolutions.com/
>  4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409
