Created
December 4, 2012 18:36
-
-
Save aalvesjr/4207287 to your computer and use it in GitHub Desktop.
Kako on PHP
This file contains hidden or 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
class Empregado { | |
private $name; | |
public function __construct($name){ | |
$this->name = $name; | |
} | |
public function pe_na_porta(){ | |
echo "Le wild {$this->name} segunda dizendo bye!"; | |
} | |
} | |
$k = new Empregado("Kako"); | |
$k->pe_na_porta(); | |
/* | |
* Isso da erro =/ | |
* new Empregado("Kako")->pe_na_porta(); | |
* | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment