Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • \$\begingroup\$ It's a long time since I programmed in PHP, but how does it know North, South, West and East are strings without double-quotes around them? Is this because of the empty String that shares the same array? If yes, does this also mean you cannot have an array with different types at once (like an array with both a string and an integer)? \$\endgroup\$ Commented Mar 24, 2017 at 12:32
  • 1
    \$\begingroup\$ @KevinCruijssen North is a constant php.net/manual/en/language.constants.php If the constant not exists it will be interpreted as string. An array in PHP can contain different types. strings can be specified in four ways php.net/manual/en/language.types.string.php \$\endgroup\$ Commented Mar 24, 2017 at 12:56