Created
March 28, 2012 16:36
-
-
Save deyvin/2228032 to your computer and use it in GitHub Desktop.
[idéia] outras sintaxes alternativas da linguagem php
This file contains 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 | |
# 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