File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,12 @@ php "$PSScriptRoot\clockhands.php" |
1313 Compare-Object (Get-Content " $PSScriptRoot \..\test\clockhands_expected" ) |
1414 Assert-MatchTests &&
1515php " $PSScriptRoot \hello_world.php" &&
16- php " $PSScriptRoot \html_escaping" &&
16+ php " $PSScriptRoot \html_escaping.php " &&
1717php " $PSScriptRoot \ternary_madness.php" &&
1818php " $PSScriptRoot \triples.php" |
1919 Compare-Object (Get-Content " $PSScriptRoot \..\test\triple_expected" ) |
2020 Assert-MatchTests &&
21+ php " $PSScriptRoot \truthy.php"
2122ForEach-Object ' foo'
2223
2324if ($Error -or ! $? ) {
Original file line number Diff line number Diff line change 1+ <?php
2+ // Falsy for different types
3+ var_dump (boolval (NULL ));
4+ var_dump (boolval (FALSE ));
5+ var_dump (boolval (0 ));
6+ var_dump (boolval (-0 ));
7+ var_dump (boolval (0.0 ));
8+ var_dump (boolval (-0.0 ));
9+ var_dump (boolval ("" ));
10+ var_dump (boolval ("0 " ));
11+ var_dump (boolval ([]));
12+
13+ // Truthy for different types
14+ var_dump (boolval (TRUE ));
15+ var_dump (boolval (1 ));
16+ var_dump (boolval (-1 ));
17+ var_dump (boolval (NAN ));
18+ var_dump (boolval (INF ));
19+ var_dump (boolval (-INF ));
20+ var_dump (boolval ("FALSE " ));
21+ var_dump (boolval ([0 ]));
22+ ?>
You can’t perform that action at this time.
0 commit comments