Skip to content

Instantly share code, notes, and snippets.

@RuSPanzer
Created September 22, 2021 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RuSPanzer/c8b73c6311411a79a67cb8eec5ff8d6c to your computer and use it in GitHub Desktop.
Save RuSPanzer/c8b73c6311411a79a67cb8eec5ff8d6c to your computer and use it in GitHub Desktop.
<?php
class B
{
public function Do() { echo "B";}
}
trait T
{
public function Do() { echo "T";}
}
class C extends B
{
use T;
public function Do() { echo "C";}
public function RunParent(){parent::Do();}
public function Run(){$this->Do();}
}
$cl = new C;
$cl->Run();
$cl->RunParent();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment