Created
June 7, 2018 21:12
-
-
Save ahuggins/d349e459385c6123cb5be1f5e40d6784 to your computer and use it in GitHub Desktop.
Implode or concatenate
This file contains hidden or 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
| <?php | |
| // Which do you prefer? | |
| return $some . '-' . $thing . '-' . $like . '-' . $this; | |
| // OR | |
| return implode('-', [$some, $thing, $like, $this]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment