blob: ec216b2dac2a7e853e73ebc2074949e80dfb8c6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
--TEST--
Bug #24884 (calling $this->__clone(); crashes php)
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class Test {
function __copy()
{
$string = PHP_VERSION;
$version = $string{0};
if($string < 5)
{
return $this;
}
else
{
return $this->__clone();
}
}
}
$test = new Test();
$test2 = $test->__copy();
var_dump($test2);
?>
--EXPECT--
object(test)#2 (0) {
}
|