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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
16 + 18 = ?
Subscribe to this entry?

 
 [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: Wed Apr 24 13:01:29 2024 UTC