Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Fixnum extends Object {
- private $value;
- function __construct($value){
- $this->value = $value;
- }
- function ==($test){
- if($this->value == $test)
- return true;
- else
- return false;
- }
- }
- $a = new Fixnum(5);
- $a->==(5); #=> true
- $a->==(6); #=> false
- ?>
Add Comment
Please, Sign In to add comment