I am new to PHP, just one day new. But I am otherwise a seasoned
programmer on many other languages like C, VB 6, C#, VB.NET, Win32
platform and have some tiny bit experience in MFC, C++, Python.
All the tutorials I read so far about PHP contain procedural examples.
I haven't yet come accross a tutorial on the object oriented PHP. Could
someone point me to one? 73 4447
Not a tutorial, but an example: http://www.w-p.dds.nl/tinyunit.htm
Water Cooler v2 wrote: I am new to PHP, just one day new. But I am otherwise a seasoned programmer on many other languages like C, VB 6, C#, VB.NET, Win32 platform and have some tiny bit experience in MFC, C++, Python.
All the tutorials I read so far about PHP contain procedural examples. I haven't yet come accross a tutorial on the object oriented PHP. Could someone point me to one?
I've seen the C++ scope resolution operator used in some place in PHP
code. I do not recall where I saw it.
What's that (::) for? Does it have the same use as in C++?
Water Cooler v2 wrote: All the tutorials I read so far about PHP contain procedural examples. I haven't yet come accross a tutorial on the object oriented PHP. Could someone point me to one?
Start with the Manual: http://www.php.net/OOP http://www.php.net/OOP5
Note that there are differences between PHP 4 and PHP 5 when it comes
to OO syntax.
Cheers,
NC
427SOHC wrote: If I haven't worked with OOP much would PHP be a safe starting point, or is there a better programming language to start with?
If you haven't worked with OOP before, start by learning OOP in the
language you otherwise know well. Once you understand the basic
concepts (encapsulation, inheritance, polymorphism, etc.), you will be
able to ask intelligent questions about how those concepts are
implemented in other languages.
Also, note that PHP 4 and PHP 5 have different object models; the one
in PHP 5 is more in line with what you find in other languages, while
the one in PHP 4 is simpler, but more restrictive.
Cheers,
NC
"NC" <nc@iname.com > wrote in message
news:11******** **************@ b68g2000cwa.goo glegroups.com.. . 427SOHC wrote: If I haven't worked with OOP much would PHP be a safe starting point, or is there a better programming language to start with?
If you haven't worked with OOP before, start by learning OOP in the language you otherwise know well. Once you understand the basic concepts (encapsulation, inheritance, polymorphism, etc.), you will be able to ask intelligent questions about how those concepts are implemented in other languages.
Also, note that PHP 4 and PHP 5 have different object models; the one in PHP 5 is more in line with what you find in other languages, while the one in PHP 4 is simpler, but more restrictive.
"More restrictive" is a point of view. It is possible to write OO code in
PHP 4 that also runs in PHP 5, as I have proved with my sample application
and later my full-blown framework.
AFAIAC the extra OO features in PHP 5 are nothing more than eye candy as
they do not provide any additional functionality which is worthy of merit.
They were only included to appease the OO purists.
--
Tony Marston http://www.tonymarston.net http://www.radicore.org This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Benjamin C. Pierce |
last post by:
The Twelth International Workshop on
Foundations of Object-Oriented Languges (FOOL 12)
Saturday 15 January 2005
Long Beach, California, USA
Following POPL 05
The search for sound principles for object-oriented languages has
given rise to much work on the theory of programming languages during
the past two decades, leading to a better understanding of the key
|
by: Martin |
last post by:
When was inheritance intruduced into object oriented programming?
More generally, does anyone know or have any sources on when the different
features were introduced into object oriented programming?
|
by: yensao |
last post by:
Hi,
I have a hard time to understand difference and similarities between
Relational database model and the Object-Oriented model. Can somebody
help me with this?
Thank you in advance.
Yensao
|
by: Roger Smythe |
last post by:
A means for the progressive decomposition a problem space into increasingly simpler component parts
such that these component parts represent higher levels of conceptual abstraction, and are
completely independent of each other except for their well-defined interfaces.
This was an attempt to explain the gist of OOP to programmers accustomed to the
structured programming paradigm. I tried to explain OOP in terms of ideals that can
be...
|
by: Rookie |
last post by:
Is C an object oriented programming language?
| |
by: E. Robert Tisdale |
last post by:
What is an object?
Where did this term come from?
Does it have any relation
to the objects in "object oriented programming"?
|
by: cppig1995 |
last post by:
C++ is not only object-oriented language.
I think the description of this group have to be changed. :-)
Have fun!
----
cppig1995 (cppig1995@gmail.com)
Daejeon Metropolitan City, Republic of Korea
11 years old in Western age.
|
by: Thierry Chappuis |
last post by:
Hi,
I'm interested in techniques used to program in an object-oriented way
using the C ANSI language. I'm studying the GObject library and Laurent
Deniau's OOPC framework published on his web site at
http://ldeniau.web.cern.ch/ldeniau/html/oopc/oopc.html. The approach is
very instructive. I know that I could do much of this stuff with e.g.
C++, but the intellectual challenge of implementing these concepts with
pure ANSI C is relevant to...
|
by: ajba74 |
last post by:
Hi fellows,
I am reading some books to learn the C programming language, and
sometimes I have the feeling that when somebody becomes a C expert, he
must learn a more modern and object-oriented language.
When I read things like "... C++ is an evolution of C ..." or "... C
is a subset of C++ ..." I tend to believe that I will have to learn C+
+ sooner or later. It sounds like C++ is the future and C is the past
(and will be no longer...
|
by: notnorwegian |
last post by:
i have some confusion over this.
sure a class is basically a classification, like for example an animal
or flower. and an object/instance of that class is then for example a
cat.
an object is an instance of a class. that i know, i also know how to
program with classes etc.
i am just confused about the term object-oriented.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |