Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- interface Aturan{
- public function cari($id);
- }
- trait Bantuan{
- public function ubah_ke_string_json($str){
- return NULL;
- }
- }
- abstract class Aturan_abstrak implements Aturan{
- use Bantuan;
- }
- class Grup extends Aturan_abstrak{
- protected $grup;
- function Grup($grup){
- $this->grup=$grup;
- }
- }
- $grup = new Grup(array
- "C" => array("administrator"),
- "A" => array("operator","staff")
- ));
- echo $grup->cari ("A");
- echo "\n";
- echo $grup->cari("B");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement