Created
September 24, 2012 17:35
-
-
Save geovanerocha/3777199 to your computer and use it in GitHub Desktop.
Use of namespaces @ 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
<?php | |
require_once 'Foo/FooClass.php'; | |
require_once 'Bar/FooClass.php'; | |
use Foo\FooClass; | |
use Bar\FooClass as BarClass; | |
$foo = new FooClass(); | |
$bar = new BarClass(); | |
if ($foo->setData('Fulano de Tal', 'fulanodetal', 'qwert')) { | |
echo $foo->getName() . ' saved.'; | |
} | |
$bar->showDifference(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment