PHP 8.5.0 Beta 2 available for testing

Voting

: min(six, four)?
(Example: nine)

The Note You're Voting On

Anonymous
1 year ago
When desiring a special class structure finalizing magic methods maybe helpful.

<?php

abstract class A {
final public function
__construnct(){ echo "A"; }
}

class
B extends A {
public function
__construct(){ echo "B"; }
}

$b = new B(); // outputs: PHP Fatal error: Cannot override final method a\A::__construct()

?>

<< Back to user notes page

AltStyle によって変換されたページ (->オリジナル) /