arrowHome arrow Forum Monday, 08 September 2008  
Main Menu
Home
Media Gallery
J2EE Blog
Forum
News
Downloads
News Feeds
FAQ's
Links
System Status
Contact Us
About iDoumo
Latest Posts
Find suspicious files abukta
Automate Filesystem Dump abukta
Add route to server abukta
Benefits of Logical Volume Management abukta
Performance Costs of using LVM abukta
Login Form
Username

Password

Remember me
Forgotten your password?
No account yet? Create one

Newsflash

16 Januar 2006

Now Joomla! 1.0.7 is out!! It is now available for download at developer.joomla.org. Joomla! 1.0.7 is essentially 1.0.6 repackaged to fix one major bug in 1.0.6 - therefore it should still be considered a Security Release. It contains nine (9) Low Level Security Fixes, and seventy (70) plus minor/non-critical bug fixes.
  iDoumo Projects
  Programming
        PHP 
              PHP Objects

Quick Jump To:

PHP Threads List - Search Forum
  Subscribe to this Thread
  PHP Objects
  20 Jan 2006 14:34 # 1 
   abukta
 super admin
 
 profile
 
Join Date: 29 Mar 2005 21:03
Posts:
 
 PHP Objects
An object is a compound data type that can contain any number of variables and functions. PHP's support for objects is very basic in Version 3. PHP Version 4 will improve the object-oriented capabilities of PHP. In PHP 3.0 the object-oriented support is designed to make it easy to encapsulate data structures and functions in order to package them into reusable classes. Here's a simple example:

Code:
class test {
var $str = "Hello World";
function init($str) {
$this->str = $str;
}
}

$class = new test;
print $class->str;
$class->init("Hello");
print $class->str;


This code creates a test object using the new operator. Then it sets a variable called str within the object. In object-speak, a variable in an object is known as a property of that object. The test object also defines a function, known as a method, called init( ). This method uses the special-purpose $this variable to change the value of the str property within that object.

If you are familiar with object-oriented programming, you should recognize that PHP's implementation is minimal. PHP3 does not support multiple inheritance, data protection (or encapsulation), and destructors. PHP does have inheritance and constructors, though.
 


<< Start < Prev 1 Next > End >>
Results 1 - 1 of 1



Help iDoumo

Help support "iDoumo" and free software by donating now!

Donate Once Monthly

Currency

Amount

Currency

Amount

Latest Events
There are no upcoming events currently scheduled.
View Full Calendar
Project Calendar
September 2008 October 2008
Su Mo Tu We Th Fr Sa
Week 36 1 2 3 4 5 6
Week 37 7 8 9 10 11 12 13
Week 38 14 15 16 17 18 19 20
Week 39 21 22 23 24 25 26 27
Week 40 28 29 30
Media Gallery
Last update:
27 Sep, 11:53
Workday

random:

PeopleSoft
top of page

iDoumo Projects. All rights reserved.