php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28900 class constants not working
Submitted: 2004-06-23 22:42 UTC Modified: 2004-06-25 05:51 UTC
From: misu200 at yahoo dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.0.0RC3 OS: Windows XP
Private report: No CVE-ID: None
 [2004-06-23 22:42 UTC] misu200 at yahoo dot com
Description:
------------
class constants not working

Reproduce code:
---------------
<?php

class aga{
const XKR=1;

function __construct()
{
echo XKR;
}

}

$aa = new aga();
?>

Expected result:
----------------
1

Actual result:
--------------
XKR

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-25 05:51 UTC] curt@php.net
echo self::KKR;

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 01:01:31 2024 UTC