-
-
Save manuelaplesa96/0ae4d5f7202a07c7880f5893a1c07707 to your computer and use it in GitHub Desktop.
The gist that shows an example of Union Types in the PHP programming language.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Example { | |
/** | |
* @var string $attribute | |
*/ | |
private string $attribute1; | |
/** | |
* @var string|null $attribute2 | |
*/ | |
private ?string $attribute2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment