Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

type hinting with enums #3

Open
olivernybroe opened this issue Sep 11, 2019 · 1 comment
Open

type hinting with enums #3

olivernybroe opened this issue Sep 11, 2019 · 1 comment
Labels
rfc New proposal

Comments

@olivernybroe
Copy link

So in the documentation it says that there is enum support, however can we also use these enums for type hinting?

Example

enum Direction {
    Up = 'up',
    Down = 'down'
}

function move(Direction $direction) {
   ....
}
@nunomaduro nunomaduro added the rfc New proposal label Sep 11, 2019
@nunomaduro nunomaduro changed the title [Question] Type hinting with Enums type hinting with enums Sep 11, 2019
@enumag
Copy link

enumag commented Sep 12, 2019

Also is is_string(Direction::Up) true or false?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
rfc New proposal
Projects
None yet
Development

No branches or pull requests

3 participants