Skip to content

Instantly share code, notes, and snippets.

@ahuggins
Created June 7, 2018 21:12
Show Gist options
  • Select an option

  • Save ahuggins/d349e459385c6123cb5be1f5e40d6784 to your computer and use it in GitHub Desktop.

Select an option

Save ahuggins/d349e459385c6123cb5be1f5e40d6784 to your computer and use it in GitHub Desktop.
Implode or concatenate
<?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