Skip to content

Instantly share code, notes, and snippets.

@tadeubdev
Created August 4, 2021 22:26
Show Gist options
  • Select an option

  • Save tadeubdev/c2a986edd7e748fb856a07d9a97b59b3 to your computer and use it in GitHub Desktop.

Select an option

Save tadeubdev/c2a986edd7e748fb856a07d9a97b59b3 to your computer and use it in GitHub Desktop.
<?php
echo "Hello " . "world!" // prints: Hello world!
// Additionally, you can use the shorthand operator (.=).
$hello = "Hello ";
$hello .= "world!";
echo $hello; // prints: Hello world!
// It's the equivalent to:
$hello = "Hello ";
$hello = $hello . "world!";
echo $hello; // prints: Hello world!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment