php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12493 Class bug..
Submitted: 2001-07-31 14:46 UTC Modified: 2001-07-31 14:49 UTC
From: dengdeng at hitel dot net Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 4.0.6 OS: Win2k
Private report: No CVE-ID: None
 [2001-07-31 14:46 UTC] dengdeng at hitel dot net
Exam1 : 

class A {

	function b() {
		echo("Hello?");
	}

}

$Ac = new A;

$Ac->b();
///////////////////////////////////////////////////////////
Exam2 : 

class A {

	function a() {
		echo("Hello?");
	}

}

$Ac = new A;

$Ac->a();
///////////////////////////////////////////////////////////

Exam1 code is once run b function but Exam2 code is two run a function. It's bug?? or my miss?? >_<


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-31 14:49 UTC] jeroen@php.net
Not a bug. a() is the constructor function of class A (remember that function names are case-insensitive).

See http://www.php.net/manual/en/language.oop.constructor.php
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 03:01:24 2019 UTC