1
0
mirror of https://github.com/php/web-php.git synced 2026-03-29 18:52:08 +02:00
Files
archived-web-php/apachecon/s_lang8.php3
Rasmus Lerdorf 2424277ad8 Add main slides
1998-10-21 23:44:28 +00:00

34 lines
824 B
PHP
Executable File

<?php require "header.inc"?>
<h2>Objects</h2>
<?example('<?class Foo {
var $name, $rank;
function Foo($name, $rank) {
$this->name = $name; $this->rank = $rank;
}
function report() {
echo "My name is ".$this->name;
echo " and my rank is ".$this->rank;
}
};
$me = new Foo("GI Joe", "Private");
$me->report();
?>');?>
<h6>Output:</H6>
<BLOCKQUOTE>
<?class Foo {
var $name, $rank;
function Foo($name, $rank) {
$this->name = $name; $this->rank = $rank;
}
function report() {
echo "My name is ".$this->name;
echo " and my rank is ".$this->rank;
}
};
$me = new Foo("GI Joe", "Private");
$me->report();
?>
</BLOCKQUOTE>
<?php require "footer.inc"?>