-
-
Save parzibyte/231e42107668dfc9869907b108e8b29c to your computer and use it in GitHub Desktop.
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 | |
class Mascota | |
{ | |
public function ladrar() | |
{ | |
echo "woof"; | |
} | |
public function comer() | |
{ | |
echo "yum"; | |
} | |
} | |
$m = new Mascota(); | |
$nombreFuncion = "ladrar"; | |
$m->$nombreFuncion(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment