Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Personne{
- private $nom;
- private $prenom;
- private $age;
- function __construct(String $nom,String $prenom,int $age){
- $this->nom=$nom;
- $this->prenom=$prenom;
- $this->age=$age;
- }
- function set_prenom(String $prenom){
- $this->prenom = $prenom;
- }
- function set_nom(String $nom){
- $this->nom = $nom;
- }
- function set_age(int $age){
- $this->age = $age;
- }
- function get_prenom():String{
- $echo $this->prenom;
- }
- function get_nom():String{
- $echo $this->nom;
- }
- function get_age():int{
- $echo $this->age;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement