note 128414 added to language.oop5.inheritance

From: Date: Thu, 20 Apr 2023 16:10:26 +0000
Subject: note 128414 added to language.oop5.inheritance
Groups: php.notes 
Request: Send a blank email to php-notes+get-220369@lists.php.net to get a copy of this message
<?php class TNIntern extends Teilnehmer { private $abteilung; private static $anzahl=0; public function __construct($n,$vn,$c,$abt) { parent::__construct($n,$vn,$c); //Aufruf des Konstruktion der Elternklasse $this->abteilung=$abt; self::$anzahl++; } public function getDaten() { if (substr($this->code,0,1)!=="#") {$this->code="Fehler";} echo "<p>Name: ".$this->name."<br> Vorname: ".$this->vorname."<br>Code: ".$this->code."<br>Abteilung: ".$this->abteilung."<br>----------------------------------------</p>"; } public static function getAnzahl() { echo "<p>Teilnehmer: ".self::$anzahl."</p>"; } } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.13.130 (proxied: 2a00:20:3053:822e:8dda:37c8:bbdc:a721) ---- Manual Page -- https://php.net/manual/en/language.oop5.inheritance.php Edit -- https://main.php.net/note/edit/128414 Del: integrated -- https://main.php.net/note/delete/128414/integrated Del: useless -- https://main.php.net/note/delete/128414/useless Del: bad code -- https://main.php.net/note/delete/128414/bad+code Del: spam -- https://main.php.net/note/delete/128414/spam Del: non-english -- https://main.php.net/note/delete/128414/non-english Del: in docs -- https://main.php.net/note/delete/128414/in+docs Del: other reasons-- https://main.php.net/note/delete/128414 Reject -- https://main.php.net/note/reject/128414 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220369) next »