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


Smartphone icons created by Freepik - Flaticon

PHP Classes/Objects

PHP - The $this Keyword

Apple

<?php
// define class Fruit
class Fruit {
  public $name;
}
$apple = new Fruit();
$apple->name = "Apple";

// display the object's name
echo $apple->name;
?>