Skip to content

Instantly share code, notes, and snippets.

@mikale
Created July 6, 2011 07:24
Show Gist options
  • Select an option

  • Save mikale/1066736 to your computer and use it in GitHub Desktop.

Select an option

Save mikale/1066736 to your computer and use it in GitHub Desktop.
<?php
trait foo{
function testFoo(){
echo 'foo';
}
}
class bar {
use foo;
function testBar(){
echo 'bar';
}
}
$obj = new bar();
$obj -> testFoo(); // foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment