php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5056 CLASSES
Submitted: 2000-06-15 14:44 UTC Modified: 2000-06-17 17:51 UTC
From: vcuas at eudoramail dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0.0 Release OS: LINUX RED HAT 6.1
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vcuas at eudoramail dot com
New email:
PHP Version: OS:

 

 [2000-06-15 14:44 UTC] vcuas at eudoramail dot com
why in php4 the following code, display a parser error?

class cub {
	
	echo "first side";
}
class solid {
	var cubo = new cub;  <-- here is the parser error
}
What is the option wich i will be enable in the compilation by this code functing?
Thanks

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-15 15:09 UTC] stas at cvs dot php dot net
Class variable initializer must be constant. Use constructors for dynamic initialization.
 [2000-06-15 17:44 UTC] vcuas at eudoramail dot com
Thank you, by your answer.
But, how i can make this?. 
Please, do you have any example about?

 [2000-06-16 23:23 UTC] hholzgra at cvs dot php dot net
see manual chapter 13 "Clsses and objects",
search for "constructors"

http://www.php.net/manual/language.oop.php
 [2000-06-17 16:08 UTC] vcuas at eudoramail dot com
Thank you very much by your help :))
But, I have a problem:
I work with database Server (MSSQL Server 7.0) in an Windows NT , my
php4.0.0 work in an LINUX RED HAT 6.1 and apache 1.3.12.
When the script make a Query sometimes download all data from database and
other times not download all.
In php3.0.15 the script run!
?Please, help me!
 [2000-06-17 17:51 UTC] mrobinso at cvs dot php dot net
This does not belong in the bug database.
Please ask these types of questions on the general
php list.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 20:01:32 2025 UTC