[DOC-BUGS] Doc #78218 [Com]: function intercepts execution of code that is not executed
[email protected] ("brandon698sherrick at outlook dot com") Fri, 03 May 2024 11:11:42 +0000
| Newsgroups | php.doc.bugs |
|---|---|
| Message-ID | <[email protected]> |
Edit report at https://bugs.php.net/bug.php?id=78218&edit=1
ID: 78218
Comment by: brandon698sherrick at outlook dot com
Reported by: lozinskiy dot artem at gmail dot com
Summary: function intercepts execution of code that is not
executed
Status: Open
Type: Documentation Problem
Package: Unknown/Other Function
Operating System: Ubuntu 18.04 LTS
PHP Version: 7.2.19
Block user comment: N
Private report: N
New Comment:
That was so amazing.
(https://github.com)(https://www-kynect.com)
Previous Comments:
------------------------------------------------------------------------
[2019-06-26 16:09:18] [email protected]
Thanks!
------------------------------------------------------------------------
[2019-06-26 16:03:11] lozinskiy dot artem at gmail dot com
>> Does this issue also happen with any actively
supported PHP version?
Yes, on versions 7.2-7.3, this problem persists.
------------------------------------------------------------------------
[2019-06-26 15:45:04] [email protected]
PHP 7.1 is no longer actively supported[1] (it receives only
security fixes). Does this issue also happen with any actively
supported PHP version?
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2019-06-26 15:28:17] lozinskiy dot artem at gmail dot com
for example see this code
<?php
declare(ticks=1);
function my_function() {
echo print_r(debug_backtrace(), 1) . '<br/>';
}
register_tick_function('my_function', true);
$t = false;
$check = ['a'];
foreach ($check as $e) {
$t = false;
if ($t===false) {
break; // break;
} else {
delete_db(); // =)
}
}
function delete_db() {}
---
analysis show me that execute delete_db, and this is problem
I see that in the alpha version of php 7.4 there is no such problem, all of a sudden, it pleases, here now to get a patch for php 7.1
------------------------------------------------------------------------
[2019-06-26 14:56:08] lozinskiy dot artem at gmail dot com
>> Whatever the actual magical process is behind ticks, I don't think there's a bug here.
Seriously, I made a convenient code analysis for myself using this function, but because of this there is no bug, as you said, I cannot trust this analysis, for me this is a bug and a problem, besides, only here is this behavior, and how can catch or identify this moment? How can I determine that the function has been correctly reversed here and not here?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=78218
--
Edit this bug report at https://bugs.php.net/bug.php?id=78218&edit=1