PHP-Code in building_superheroes/01_step/class/SecondExample.class.php

<?php
class SecondExample {
    // Funktionen in Objekten heissen "Methoden" (en. method)

    function sayHello() {
        $str = "Hello World";
        return $str;
    }

    function sayPI() {
		$zahlPI = pi();
        $PIgerundet = round($zahlPI, 2);
		return $PIgerundet;
	}
}
?>