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
Fix issue with calling a unique, non-persistent method
[hiphop-php.git]
/
hphp
/
test
/
slow
/
hhbbc
/
dce_004.php
blob
8b86fbc3981e21dbe3691c24cc1271d1ae717a00
1
<
?php
2
3
class
str
{}
4
class
str1
extends
str
{
public function
__toString
() {
return
"a"
; } }
5
class
str2
extends
str
{
6
public function
__toString
() {
throw new
Exception
(
'a'
); }
7
}
8
9
function
bar
(
str
$k
) {
10
$tmp
=
54
;
11
try
{
12
$y
=
$k
->
__toString
();
13
$tmp
=
2
;
14
}
catch
(
Exception
$x
) {
15
var_dump
(
$tmp
);
16
}
17
var_dump
(
$tmp
);
18
}
19
20
bar
(
new
str1
);
21
bar
(
new
str2
);
22