Which version does php support new $ variable () instantiation class?
Source: Internet
Author: User
Which version does php support new $ variable () instantiation class? For example, if you use a variable to specify a class name and use the new instance object, which version of php is supported? Not found in the php manual, or even this writing method ., This is very early, right? Php4 has an instantiation class. Which version does php support new $ variable () instantiation class?
For example, if you use a variable to specify a class name and use the new instance object, which version of php is supported?
Not found in the php manual, or even this writing method.
------ Solution --------------------
This is very early, right? Php4 has an instantiation class. $ A = new B (); or $ a = new B;
------ Solution --------------------
Class and object (PHP 4) inheritance class and object (PHP 4)
PHP Manual
--------------------------------------------
Class
A class is a set of variables and functions acting on these variables. Variables are defined by var, functions are defined by function, and classes are defined by the following syntax:
------ Solution --------------------
Php4
This method is used when classes are introduced.
------ Solution --------------------
4.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.