This commit is contained in:
2024-08-20 13:43:58 +02:00
parent 97ecb38f48
commit f72f657b0a
47 changed files with 375 additions and 4 deletions

30
Aufgabe_29/index.php Normal file
View File

@@ -0,0 +1,30 @@
<!-- Ziel ist hier, unten eigenen Code einzufügen, welcher die obere Klasse verwendet. Auf dem Bild zu dieser Aufgabe finden Sie die gewollte Ausgabe. -->
<?php
class Ex
{
private string $setString;
function SetString(string $str)
{
$setString = $str;
throw new Exception("Problem beim Setzen des Strings!");
}
function ShowString()
{
echo "<p>".$setString."</p>";
throw new Exception("Problem beim Zeigen des Strings!");
}
}
//1. Erstellen der Instanz
$cl = new Ex;
//Code START
//Code ENDE
?>