Bug #79885 [NEW]: Backtrace behaviour seems wrong/changed
| From: | kenashkov at gmail dot com | Date: | Wed, 22 Jul 2020 14:48:20 +0000 |
| Subject: | Bug #79885 [NEW]: Backtrace behaviour seems wrong/changed | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-228179@lists.php.net to get a copy of this message | ||
From: kenashkov at gmail dot com
Operating system: Debian 9 4.15.0-91-generic
PHP version: 7.4.8
Package: Scripting Engine problem
Bug Type: Bug
Bug description:Backtrace behaviour seems wrong/changed
Description:
------------
The backtrace generate at object __destruct() seems has changed. PHP
7.2.24 returns the expected result, while on PHP 7.4.8 a stack frame is
missing.
Test script:
---------------
<?php
class ref
{
public function __destruct() {
debug_print_backtrace();
print 'destr';
}
}
function f1() {
try {
f2();
} catch (\Exception $E) {
}
}
function f2() {
$o = new ref;
throw new \Exception('ex');
}
f1();
Expected result:
----------------
#0 ref->__destruct() called at [/t1.php:22]
#1 f2() called at [/t1.php:13]
#2 f1() called at [/t1.php:25]
Actual result:
--------------
#0 ref->__destruct() called at [/t1.php:13]
#1 f1() called at [/t1.php:25]
--
Edit bug report at https://bugs.php.net/bug.php?id=79885&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79885&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79885&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79885&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79885&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79885&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79885&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79885&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79885&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79885&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79885&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79885&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79885&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79885&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79885&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79885&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79885&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79885&r=mysqlcfg