Skip to content

Instantly share code, notes, and snippets.

@deyvin
Created March 28, 2012 16:36
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 deyvin/2228032 to your computer and use it in GitHub Desktop.
Save deyvin/2228032 to your computer and use it in GitHub Desktop.
[idéia] outras sintaxes alternativas da linguagem php
<?php
# ATENÇÃO - PARTE DESTE CÓDIGO NÃO FUNCIONA!
# Hoje em dia temos
if($cor == "Vermelho")
echo "Faça algo";
endif;
# e também
switch($cor)
case 'vermelho': echo "Faça algo";
break;
case 'azul': echo "Faça Algo";
break;
endswitch;
# Por que não também para function
function teste()
endfunc;
#ou para class
class Cor
endclass;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment