Skip to content

Instantly share code, notes, and snippets.

@ukstudio
Created February 17, 2010 02:21
Show Gist options
  • Select an option

  • Save ukstudio/306215 to your computer and use it in GitHub Desktop.

Select an option

Save ukstudio/306215 to your computer and use it in GitHub Desktop.
<?php
class Square {
private $height;
private $width;
public function setHeight($height) {
$this->height = $height;
$this->widh = $height;
}
public function getHeight() {
return $this->height;
}
public function setWidth($width) {
$this->height = $width;
$this->widh = $width;
}
public function getWidth() {
return $this->width;
}
}
$square = new Square();
$square->setHeight(100);
$square->setWidth(80);
echo $square->getHeight(); // 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment