Bug #79093 [Opn->Dup]: david@grudl.com
| From: | nikic@php.net | Date: | Fri, 10 Jan 2020 11:03:55 +0000 |
| Subject: | Bug #79093 [Opn->Dup]: david@grudl.com | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-224826@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79093&edit=1
ID: 79093
Updated by: nikic@php.net
Reported by: david at grudl dot com
Summary: david@grudl.com
-Status: Open
+Status: Duplicate
Type: Bug
Package: Output Control
PHP Version: 7.4.1
Block user comment: N
Private report: N
New Comment:
Duplicate of bug #79022, which is fixed in 7.4.2.
Previous Comments:
------------------------------------------------------------------------
[2020-01-10 11:00:43] david at grudl dot com
Description:
------------
In PHP 7.4 class_exists($c, true) can return false and class_exists($c, false) can return true in
one moment.
Test script:
---------------
file classes.php:
-----
<?php
class C1
{
function f($arg)
{
}
}
class C2 extends C1
{
function f()
{
}
}
?>
file test.php:
-------
<?php
set_error_handler(function () {
var_dump(class_exists('C2', true)); // returns false
var_dump(class_exists('C2', false)); // returns true
});
include 'classes.php';
?>
Expected result:
----------------
Both return the same value.
Actual result:
--------------
var_dump(class_exists('C2', true)); // returns false
var_dump(class_exists('C2', false)); // returns true
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79093&edit=1