Created
March 28, 2012 14:05
-
-
Save deyvin/2226455 to your computer and use it in GitHub Desktop.
Esta noite sonhei que a sintaxe do php estava assim
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 | |
/* | |
* Tive um sonho muito estranho essa noite, | |
* sonhei que estava escrevendo php desta forma abaixo | |
* no meu sonho parecia algo meio ruby + php + python | |
* | |
* sei lá acho que estou com pânico de "{" | |
*/ | |
#php nativo | |
if($cor == 'vermelho') { | |
$mensagem = "Sinal vermelho"; | |
} | |
#sintaxe do "sonho" | |
$mensagem = "Sinal Vermelho" if($cor == 'vermelho') | |
/* ----------------------------------------------------------------- */ | |
#php nativo | |
class MinhaClasse { | |
$atributo; | |
function facaAlgo() { | |
//alguma coisa | |
} | |
} | |
#sintaxe do "sonho" | |
class MinhaClasse | |
$atributo | |
function facaAlgo() | |
//alguma coisa | |
end; | |
end; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ruby vá de retro!!!