What will be the output of the following PHP code?
class Checkout
{
final function totalize()
{
// calculate bill
}
}
class IllegalCheckout extends Checkout
{
final function totalize()
{
// change bill calculation
}
}
class Checkout
{
final function totalize()
{
// calculate bill
}
}
class IllegalCheckout extends Checkout
{
final function totalize()
{
// change bill calculation
}
}
A. PHP Fatal error: Class IllegalCheckout may not inherit from final class
B. Value of the bill calculated
C. PHP Fatal error: Cannot find object
D. PHP Fatal error: Cannot override final method
Answer: Option D
Join The Discussion