git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@147085 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Stefan Walk 2003-12-21 15:59:19 +00:00
parent 2281be554e
commit d774042fc7

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.47 $ -->
<!-- $Revision: 1.48 $ -->
<chapter id="language.oop">
<title>Classes and Objects</title>
@ -114,12 +114,13 @@ class test {
<programlisting role="php">
<![CDATA[
<?php
/* None of these will work in PHP 4. */
class Cart
{
/* None of these will work in PHP 4. */
var $todays_date = date("Y-m-d");
var $name = $firstname;
var $owner = 'Fred ' . 'Jones';
/* Arrays containing constant values will, though. */
var $items = array("VCR", "TV");
}
@ -129,7 +130,7 @@ class Cart
var $todays_date;
var $name;
var $owner;
var $items;
var $items = array("VCR", "TV");
function Cart()
{