Bug #75509 [Com]: Call "new static()" on __destruct will say segmentation fault
| From: | sjon at hortensius dot net | Date: | Fri, 10 Nov 2017 08:13:34 +0000 |
| Subject: | Bug #75509 [Com]: Call "new static()" on __destruct will say segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212535@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75509&edit=1
ID: 75509
Comment by: sjon at hortensius dot net
Reported by: memory dot agape at gmail dot com
Summary: Call "new static()" on __destruct will say
segmentation fault
Status: Open
Type: Bug
Package: *General Issues
Operating System: MacOS High Sierra
PHP Version: 7.1.11
Block user comment: N
Private report: N
New Comment:
this is not a bug - this is simple recursion. What did you expect would happen?
Previous Comments:
------------------------------------------------------------------------
[2017-11-10 08:07:04] memory dot agape at gmail dot com
Description:
------------
Call "new static()" on __destruct will say segmentation fault
-----
[1] 17385 segmentation fault php test.php
-----
Test script:
---------------
<?php
class A
{
public function __destruct()
{
new static();
}
}
new A();
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75509&edit=1