Skip to content

Commit 0ab5f70

Browse files
committed
ext/spl: Remove bool type coercions in tests
1 parent ff0a2cf commit 0ab5f70

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

‎ext/spl/tests/bug36287.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Bug #36287 (Segfault with SplFileInfo conversion)
33
--FILE--
44
<?php
55

6-
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("."), true);
6+
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("."), RecursiveIteratorIterator::SELF_FIRST);
77

88
$idx = 0;
99
foreach($it as $file)

‎ext/spl/tests/iterator_003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class StudentList implements IteratorAggregate
7070
}
7171

7272
public function getIterator(): Traversable {
73-
return new CachingIterator($this->students->getIterator(), true);
73+
return new CachingIterator($this->students->getIterator());
7474
}
7575
}
7676

‎ext/spl/tests/pqueue_001.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $pq->insert("b", 2);
1616
$pq->insert("c", 0);
1717

1818
foreach ($pq as $k=>$v) {
19-
echo "$k=>".print_r($v, 1)."\n";
19+
echo "$k=>".print_r($v, true)."\n";
2020
}
2121

2222
echo "EXTR_BOTH\n";
@@ -29,7 +29,7 @@ $pq1->insert("b", 2);
2929
$pq1->insert("c", 0);
3030

3131
foreach ($pq1 as $k=>$v) {
32-
echo "$k=>".print_r($v, 1)."\n";
32+
echo "$k=>".print_r($v, true)."\n";
3333
}
3434

3535
echo "EXTR_DATA\n";
@@ -42,7 +42,7 @@ $pq2->insert("b", 2);
4242
$pq2->insert("c", 0);
4343

4444
foreach ($pq2 as $k=>$v) {
45-
echo "$k=>".print_r($v, 1)."\n";
45+
echo "$k=>".print_r($v, true)."\n";
4646
}
4747

4848
echo "EXTR_PRIORITY\n";
@@ -55,7 +55,7 @@ $pq3->insert("b", 2);
5555
$pq3->insert("c", 0);
5656

5757
foreach ($pq3 as $k=>$v) {
58-
echo "$k=>".print_r($v, 1)."\n";
58+
echo "$k=>".print_r($v, true)."\n";
5959
}
6060

6161
?>

‎ext/spl/tests/spl_003.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ var_dump(class_parents(new c),
1616
class_parents(new b),
1717
class_parents("b"),
1818
class_parents("d"),
19-
class_parents("foo", 0),
20-
class_parents("foo", 1)
19+
class_parents("foo", false),
20+
class_parents("foo", true)
2121
);
2222

2323
interface iface1{}
@@ -26,7 +26,7 @@ class f implements iface1, iface2{}
2626
var_dump(class_implements(new a),
2727
class_implements("a"),
2828
class_implements("aaa"),
29-
class_implements("bbb", 0)
29+
class_implements("bbb", false)
3030
);
3131

3232
?>

0 commit comments

Comments
 (0)