php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #27388 complete compatibility check in E_STRICT mode
Submitted: 2004-02-24 23:15 UTC Modified: 2004-02-25 03:26 UTC
From: agl at xs4all dot nl Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 5.0.0b4 (beta4) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: agl at xs4all dot nl
New email:
PHP Version: OS:

 

 [2004-02-24 23:15 UTC] agl at xs4all dot nl
Description:
------------
Background:
People need a migration path from PHP4 to PHP5. Some things that work in PHP5 won't work in PHP5, or work differently.
PHP5 has an E_STRICT setting, which catches many of these issues. They can be logged, so a dev can enable this, go through their log for a while, until it stays empty Then their app should be relatively clean.

Issue: Not all situations are checked. They need to be, otherwise the migration path is still not clear.
For instance a pass-object-by-value which is allowed in PHP4 simply ends up being a pass-object-by-reference in PHP5. I would suggest that with E_STRICT enabled, PHP5 should issue a warning if no &$obj is specified.
Yes this is slightly ugly and perhaps there are nicer solutions possible. I'm merely pointing out the need to address the migration issue. All of it, not 90%. 90% is not enough for the real world.
There are very big PHP apps out there, and just having people dig through all code hoping to spot all issues is unrealistic.
Thanks.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-25 03:26 UTC] helly@php.net
There is a compatibility mode that allows implicit object cloning as PHP 4 did, so this does not fit into E_STRICT.
 [2004-02-25 12:31 UTC] papercrane at reversefold dot com
Does the compatibility mode show when old semantics are used? If not, this bug is still valid IMHO. People need a way to find incompatibilities between PHP4 code and PHP5 without having to eyeball everything or hunt down obscure errors.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 12:01:30 2024 UTC