<?php
class MyExtClass extends MyClass {
private $myName;
private $myAdress;
function setMyName($myName){
$this->myName=$myName;
}
function print1 ($myName, $myAdress){
echo "My Name is: {$this->myName} ";
echo "My Adress is: $myAdress \n";
}
}
//=========================================================
// Реализация класса
$myClass = new MyExtClass();
$myClass->setMyName("ddddd");
$myClass->print1("sssss", "1111111111111111");
class MyClass {
private $myName;
private $myAdress;
/*
function __construct (){
$this->myName=$myName;
$this->myAdress = $myAdress;
*/
function setMyName($myName){
$this->myName=$myName;
}
function print1 ($myName, $myAdress){
echo "My Name is: {$this->myName} <br/>";
echo "My Adress is: $myAdress \n";
}
}
//=========================================================
?> |
<?php
class MyExtClass extends MyClass {
private $myName;
private $myAdress;
function setMyName($myName){
$this->myName=$myName;
}
function print1 ($myName, $myAdress){
echo "My Name is: {$this->myName} ";
echo "My Adress is: $myAdress \n";
}
}
//=========================================================
// Реализация класса
$myClass = new MyExtClass();
$myClass->setMyName("ddddd");
$myClass->print1("sssss", "1111111111111111");
class MyClass {
private $myName;
private $myAdress;
/*
function __construct (){
$this->myName=$myName;
$this->myAdress = $myAdress;
*/
function setMyName($myName){
$this->myName=$myName;
}
function print1 ($myName, $myAdress){
echo "My Name is: {$this->myName} <br/>";
echo "My Adress is: $myAdress \n";
}
}
//=========================================================
?>