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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 00:01:30 2024 UTC