This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

PHP Traits

OOP is fun!

<?php
// define a trait
trait message1 {
  public function msg1() {
    echo "OOP is fun! "; 
  }
}

// use the trait
class Welcome {
  use message1;
}

$obj = new Welcome();
$obj->msg1();
?>