php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75104 Example #3 Heredoc string quoting example
Submitted: 2017-08-22 03:34 UTC Modified: 2017-08-22 12:47 UTC
From: jeff at jeffharris dot us Assigned: cmb (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
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: jeff at jeffharris dot us
New email:
PHP Version: OS:

 

 [2017-08-22 03:34 UTC] jeff at jeffharris dot us
Description:
------------
---
From manual page: http://www.php.net/language.types.string
---

The Example #3 uses an old style constructor, which is DEPRECATED in PHP 7.0, This should be changed, or at least noted that the old style constructors were DEPRECATED in PHP 7.0.



class foo
{
    var $foo;
    var $bar;

    function foo()
    {
        $this->foo = 'Foo';
        $this->bar = array('Bar1', 'Bar2', 'Bar3');
    }
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-08-22 10:06 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=342904
Log: Fix #75104: Example 3 Heredoc string quoting example

Since the manual doesn't apply to PHP 4 anymore, there is no need
to use old-style constructors in general examples.
 [2017-08-22 10:06 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2017-08-22 10:06 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2017-08-22 11:24 UTC] salathe@php.net
-Status: Closed +Status: Re-Opened
 [2017-08-22 11:24 UTC] salathe@php.net
There is at least one other occurrence of this (PHP 4-style constructors) on the same page.  Would you mind going over the whole page and addressing them?
 [2017-08-22 12:46 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=342905
Log: Fix #75104: yet another old-style constructor
 [2017-08-22 12:47 UTC] cmb@php.net
-Status: Re-Opened +Status: Closed
 [2017-08-22 12:47 UTC] cmb@php.net
Thanks, Peter. It seems that there was only one other old-style
constructor (example 7).
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=a61987978df83d82f1da3b087aa3b43a6c5573b8
Log: Fix #75104: yet another old-style constructor
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=f3341279fd71fd89e7b2565df3779cf5675f4ee6
Log: Fix #75104: Example 3 Heredoc string quoting example
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 05:00:01 2026 UTC