summaryrefslogtreecommitdiff
path: root/tests/classes/__set__get_001.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/classes/__set__get_001.phpt')
-rw-r--r--tests/classes/__set__get_001.phpt46
1 files changed, 23 insertions, 23 deletions
diff --git a/tests/classes/__set__get_001.phpt b/tests/classes/__set__get_001.phpt
index 244119a2d0..f240817f4a 100644
--- a/tests/classes/__set__get_001.phpt
+++ b/tests/classes/__set__get_001.phpt
@@ -3,33 +3,33 @@ ZE2 __set() and __get()
--FILE--
<?php
class setter {
- public $n;
- public $x = array('a' => 1, 'b' => 2, 'c' => 3);
+ public $n;
+ public $x = array('a' => 1, 'b' => 2, 'c' => 3);
- function __get($nm) {
- echo "Getting [$nm]\n";
+ function __get($nm) {
+ echo "Getting [$nm]\n";
- if (isset($this->x[$nm])) {
- $r = $this->x[$nm];
- echo "Returning: $r\n";
- return $r;
- }
- else {
- echo "Nothing!\n";
- }
- }
+ if (isset($this->x[$nm])) {
+ $r = $this->x[$nm];
+ echo "Returning: $r\n";
+ return $r;
+ }
+ else {
+ echo "Nothing!\n";
+ }
+ }
- function __set($nm, $val) {
- echo "Setting [$nm] to $val\n";
+ function __set($nm, $val) {
+ echo "Setting [$nm] to $val\n";
- if (isset($this->x[$nm])) {
- $this->x[$nm] = $val;
- echo "OK!\n";
- }
- else {
- echo "Not OK!\n";
- }
- }
+ if (isset($this->x[$nm])) {
+ $this->x[$nm] = $val;
+ echo "OK!\n";
+ }
+ else {
+ echo "Not OK!\n";
+ }
+ }
}
$foo = new Setter();