summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug40872.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/bug40872.phpt')
-rw-r--r--ext/spl/tests/bug40872.phpt32
1 files changed, 16 insertions, 16 deletions
diff --git a/ext/spl/tests/bug40872.phpt b/ext/spl/tests/bug40872.phpt
index 909951f3d3..77c0063de4 100644
--- a/ext/spl/tests/bug40872.phpt
+++ b/ext/spl/tests/bug40872.phpt
@@ -2,26 +2,26 @@
Bug #40872 (inconsistency in offsetSet, offsetExists treatment of string enclosed integers)
--FILE--
<?php
- class Project {
- public $id;
+ class Project {
+ public $id;
- function __construct($id) {
- $this->id = $id;
- }
- }
+ function __construct($id) {
+ $this->id = $id;
+ }
+ }
- class ProjectsList extends ArrayIterator {
- public function add(Project $item) {
- $this->offsetSet($item->id, $item);
- }
- }
+ class ProjectsList extends ArrayIterator {
+ public function add(Project $item) {
+ $this->offsetSet($item->id, $item);
+ }
+ }
- $projects = new ProjectsList();
- $projects->add(new Project('1'));
- $projects->add(new Project(2));
+ $projects = new ProjectsList();
+ $projects->add(new Project('1'));
+ $projects->add(new Project(2));
- var_dump($projects->offsetExists(1));
- var_dump($projects->offsetExists('2'));
+ var_dump($projects->offsetExists(1));
+ var_dump($projects->offsetExists('2'));
?>
--EXPECT--
bool(true)