} public function getSomIsStriktNegatief($getal1, $getal2, $getal3) { $antw = $getal1 + $getal2 + $getal3 < 0; if ($antw == true) { return "JA"; } else { return "NEEN"; } } } ?> <!DOCTYPE HTML> <html> <head> <meta charset=utf-8> <title>Vergelijking</title> </head> <body> <h1> <?php $vgl = new Vergelijking(); print $vgl->getSomIsStriktPositief(10, -9); ?> </br> <?php print $vgl->getSomIsStriktNegatief(10, -9, -2); ?> </h1> </body> </html>
if ($gratisThuisbezorging) { print "Uw pizza wordt gratis thuisbezorgd."; } else { print "Thuislevering kost 1 euro."; } ?> <!DOCTYPE html> <html> <head> <title>Hello world</title> <style type="text/css"> h1 { color: red; } </style> </head> <body> <h1> <?php $vergl = new Vergelijking(); print $vergl->getSomIsStriktPositief(5, -9); ?> </h1> <h1> <?php print $vergl->getSomIsStriktNegatief(-5, -9, 2); ?> </h1> </body> </html>