php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62992 There is a coding error in an example.
Submitted: 2012-09-02 03:46 UTC Modified: 2012-09-02 14:54 UTC
From: shaquin dot 2 at live dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant 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: shaquin dot 2 at live dot com
New email:
PHP Version: OS:

 

 [2012-09-02 03:46 UTC] shaquin dot 2 at live dot com
Description:
------------
---
From manual page: http://www.php.net/keyword.extends.php
---
var $owner; is used in the code sample, that is JavaScript syntax, not PHP syntax.

It should be private $owner; or something similar.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-02 14:54 UTC] bjori@php.net
Thats a perfectly valid syntax in PHP.
The recommended approach in PHP5 is public/protected/private, but var is totally 
acceptable and is in fact just the same as doing public $prop.
 [2012-09-02 14:54 UTC] bjori@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon May 17 00:01:23 2021 UTC