{ echo 'Product Price = ' . $price . '<br>'; echo 'discount rate = ' . $discount . '%<br>'; $discount = $price * ($discount / 100); $price = $price - $discount; echo 'After Discount = $' . $price . '<br>'; } } ?> <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <?php $john = new Profile('John Doe', 'Web Developer', 'Male', '23'); $mamun = new Profile('Mamun Hossain', 'Front End Developer', 'Male', '30'); ?> <h2>Price in Discount</h2> <?php $price = new ProductPrice(); $price->price(100, 10); ?> </body> </html>