Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 274 Bytes

InvalidEnumMethod.md

File metadata and controls

15 lines (12 loc) · 274 Bytes

InvalidEnumMethod

Enums may not define most of the magic methods like __get, __toString, etc.

<?php
enum Status: string {
    case Open = 'open';
    case Closed = 'closed';

    public function __toString(): string {
        return "SomeStatus";
    }
}