diff options
| author | Marcus Boerger <helly@php.net> | 2003-06-01 16:41:53 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2003-06-01 16:41:53 +0000 |
| commit | 9211aed9846ba4e9c33070f3901e961982fc39a4 (patch) | |
| tree | dfee986a271385b617bbe80ee655bea4fbd78c8f | |
| parent | 53dae40d5a624dcb052f4b166e7be2ea63e373c9 (diff) | |
| download | php-git-9211aed9846ba4e9c33070f3901e961982fc39a4.tar.gz | |
Simplify by using __METHOD__
| -rwxr-xr-x | ext/spl/tests/foreach.phpt | 10 | ||||
| -rwxr-xr-x | ext/spl/tests/foreach_break.phpt | 10 | ||||
| -rwxr-xr-x | ext/spl/tests/forward.phpt | 8 | ||||
| -rwxr-xr-x | ext/spl/tests/sequence.phpt | 12 |
4 files changed, 20 insertions, 20 deletions
diff --git a/ext/spl/tests/foreach.phpt b/ext/spl/tests/foreach.phpt index fdef242028..f3c902e74f 100755 --- a/ext/spl/tests/foreach.phpt +++ b/ext/spl/tests/foreach.phpt @@ -13,20 +13,20 @@ class c_iter implements spl::forward_assoc { $this->obj = $obj; } function current() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; return $this->num; } function next() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; $this->num++; } function has_more() { $more = $this->num < $this->obj->max; - echo __CLASS__ . '::' . __FUNCTION__ . ' = ' .($more ? 'true' : 'false') . "\n"; + echo __METHOD__ . ' = ' .($more ? 'true' : 'false') . "\n"; return $more; } function key() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; switch($this->num) { case 0: return "1st"; case 1: return "2nd"; @@ -41,7 +41,7 @@ class c implements spl::iterator { public $max = 3; function new_iterator() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; return new c_iter($this); } } diff --git a/ext/spl/tests/foreach_break.phpt b/ext/spl/tests/foreach_break.phpt index f1c7b27218..606682d73c 100755 --- a/ext/spl/tests/foreach_break.phpt +++ b/ext/spl/tests/foreach_break.phpt @@ -13,20 +13,20 @@ class c_iter implements spl::forward_assoc { $this->obj = $obj; } function current() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; return $this->num; } function next() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; $this->num++; } function has_more() { $more = $this->num < $this->obj->max; - echo __CLASS__ . '::' . __FUNCTION__ . ' = ' .($more ? 'true' : 'false') . "\n"; + echo __METHOD__ . ' = ' .($more ? 'true' : 'false') . "\n"; return $more; } function key() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; switch($this->num) { case 0: return "1st"; case 1: return "2nd"; @@ -41,7 +41,7 @@ class c implements spl::iterator { public $max = 3; function new_iterator() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; return new c_iter($this); } } diff --git a/ext/spl/tests/forward.phpt b/ext/spl/tests/forward.phpt index 37d2251948..3421593268 100755 --- a/ext/spl/tests/forward.phpt +++ b/ext/spl/tests/forward.phpt @@ -10,19 +10,19 @@ class c implements spl::forward_assoc { public $num = 0; function current() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; return $this->num; } function next() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; $this->num++; } function has_more() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; return $this->num < $this->max; } function key() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; switch($this->num) { case 0: return "1st"; case 1: return "2nd"; diff --git a/ext/spl/tests/sequence.phpt b/ext/spl/tests/sequence.phpt index 3608e15c41..3c6ef2a234 100755 --- a/ext/spl/tests/sequence.phpt +++ b/ext/spl/tests/sequence.phpt @@ -9,7 +9,7 @@ class c implements spl::iterator { public $max = 3; function new_iterator() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; return new c_iter($this); } } @@ -23,23 +23,23 @@ class c_iter implements spl::sequence_assoc { $this->obj = $obj; } function rewind() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; $this->num = 0; } function current() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; return $this->num; } function next() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; $this->num++; } function has_more() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; return $this->num < $this->obj->max; } function key() { - echo __CLASS__ . '::' . __FUNCTION__ . "\n"; + echo __METHOD__ . "\n"; switch($this->num) { case 0: return "1st"; case 1: return "2nd"; |
