Bug #79740 [Asn->Csd]: serialize() and unserialize() methods can not be called statically
| From: | nikic@php.net | Date: | Fri, 26 Jun 2020 10:54:35 +0000 |
| Subject: | Bug #79740 [Asn->Csd]: serialize() and unserialize() methods can not be called statically | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-227689@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79740&edit=1
ID: 79740
Updated by: nikic@php.net
Reported by: qqqqqwwwww731 at gmail dot com
Summary: serialize() and unserialize() methods can not be
called statically
-Status: Assigned
+Status: Closed
Type: Bug
Package: *General Issues
Operating System: Linux
PHP Version: 7.4.7
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Fixed by https://github.com/php/php-src/commit/c5caa051711319f78b2b8b116dbc0186a73049a0,
for some reason the auto-close did not trigger.
Previous Comments:
------------------------------------------------------------------------
[2020-06-26 08:26:46] nikic@php.net
The problem is that we do not set ZEND_ACC_ALLOW_STATIC for serialize/unserialize methods anymore.
------------------------------------------------------------------------
[2020-06-26 08:20:42] nikic@php.net
The correct result is bool(false) for both, which is returned in PHP 8.
What's weird here is that one of the cases returns false and the other true. At least they
should be returning the same value.
------------------------------------------------------------------------
[2020-06-26 08:10:13] qqqqqwwwww731 at gmail dot com
Description:
------------
is_callable function behavior changed in php 7.4
Test script:
---------------
<?php
class A
{
public function serialize($v)
{
}
public function func($v)
{
}
}
var_dump(is_callable(['A', 'serialize']));
var_dump(is_callable(['A', 'func']));
Expected result:
----------------
bool(true)
bool(true)
as in php before 7.4
Actual result:
--------------
in php 7.4 we have
bool(false)
bool(true)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79740&edit=1