Skip to content

Instantly share code, notes, and snippets.

@maykonmeier
Created August 3, 2014 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maykonmeier/0494530132da04dfb35e to your computer and use it in GitHub Desktop.
Save maykonmeier/0494530132da04dfb35e to your computer and use it in GitHub Desktop.
Operadores de atribuição
<?php
// $a é igual a 9 agora e $b foi configurado como 4.
$a = ($b = 4) + 5;
// Operadores combinados
$a = 3;
$a += 5; // configura $a para 8, como se disséssemos: $a = $a + 5;
$b = "Bom ";
$b .= "dia!"; // configura $b para "Bom dia!", como em $b = $b . "Dia!";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment