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
Handle this typehints
[hiphop-php.git]
/
hphp
/
test
/
quick
/
hopt-eqObj.php
blob
fdea6194d67631e35573ceab1f96f6fb39296b8e
1
<
?hh
2
3
class
X
{}
4
5
function
foo
(
$x
,
$y
) {
6
return
$x
==
$y
;
7
}
8
$x
=
new
X
;
9
foo
(
$x
,
$x
);
10
11
12
$x
=
new
X
;
13
$y
=
new
stdClass
;
14
15
function
baz
(
$r
,
$s
) {
16
switch
(
$r
) {
17
case
$s
:
echo
'arg '
;
break
;
18
default
:
echo
'def '
;
19
}
20
}
21
baz
(
$x
,
$y
);
22
23
function
bal
(
$r
,
$s
) {
24
if
(
$r
==
$s
) {
25
echo
'arg '
;
26
}
else
{
27
echo
'def '
;
28
}
29
}
30
bal
(
$x
,
$y
);
31
32
printf
(
"
\n
"
);
33