php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28488 No warning reported when using string as object
Submitted: 2004-05-22 13:15 UTC Modified: 2005-01-15 00:13 UTC
From: tomas dot matousek at matfyz dot cz Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.0.0RC2 OS: WinXP
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: tomas dot matousek at matfyz dot cz
New email:
PHP Version: OS:

 

 [2004-05-22 13:15 UTC] tomas dot matousek at matfyz dot cz
Description:
------------
PHP should report a warning if -> operator is used on a string.

Reproduce code:
---------------
<?
$x = "sdfs";

$x->y->z = 1;

var_dump($x);
?>

Expected result:
----------------
Warning: ... 
string(4) "sdfs" 

Actual result:
--------------
string(4) "sdfs" 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-15 00:13 UTC] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Use error_reporting(E_ALL|E_STRICT); to turn on E_STRICT notices.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 12:01:33 2025 UTC