php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48261 Paamayim Nekudotayim on class variables
Submitted: 2009-05-13 13:15 UTC Modified: 2009-05-13 13:21 UTC
From: bla at bla dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.3.0RC2 OS: Windows
Private report: No CVE-ID: None
 [2009-05-13 13:15 UTC] bla at bla dot com
Description:
------------
just look @ the code

Reproduce code:
---------------
<?php
class A {
    public $b;
    public function __construct() {
        $this->b = new B;
    }
}
class B {
    const text = "Hello World";
}
$a = new A;
var_dump($a);
var_dump($a->b);
var_dump($a->b::text);      // Error
var_dump(($a->b)::text);    // Error
$b = $a->b;
var_dump($b::text);         // Works
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-13 13:21 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Mar 18 13:00:01 2026 UTC