codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php class PopStar { public $person; public $salary; public $album; public function setSalary() { $this->salary = 10000; } public function getSalary() { echo $this->salary; } } $star = new PopStar(); $star->setSalary(); echo "The pop star salary is:"; echo "\n"; $star->getSalary(); ?>
Private
[
?
]
Run code
Submit