repo.or.cz
/
hiphop-php.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No error on use of `unsafe_cast`
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
datetime_compare.php
blob
dd611d347061f72e31095580066869d9270e1624
1
<
?hh
// strict
2
3
function
test_compare
(
DateTime
$d
):
bool
{
4
$new_datetime
=
new
DateTime
();
5
return
$d
<
$new_datetime
;
6
}
7
8
function
test_compare_generics
<
T
as
DateTime
>(
T
$d1
,
DateTime
$d2
):
bool
{
9
return
$d1
>
$d2
;
10
}