PHP 8.5.0 Alpha 1 available for testing

Voting

: eight plus one?
(Example: nine)

The Note You're Voting On

ASchmidt at Anamera dot net
6 years ago
If the method name is set to an empty string, then the flags for the CLASS itself will be affected, instead of an individual method. This can be used to remove the "final" attribute from a class.
<?php
declare(strict_types=1);

final class
MyClass { function mymethod() {} };
uopz_flags(MyClass::class, '', 0);
?>

Note: Although not documented, setting the method to NULL will also target the CLASS flags, however, that syntax will clash with strict types because of the developer's improper function signature.

<< Back to user notes page

To Top