mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
23 lines
542 B
PHP
23 lines
542 B
PHP
--TEST--
|
|
Bug #79740: serialize() and unserialize() methods can not be called statically
|
|
--FILE--
|
|
<?php
|
|
class A {
|
|
public function serialize() { }
|
|
public function unserialize() { }
|
|
}
|
|
|
|
var_dump(is_callable(['A', 'serialize']));
|
|
var_dump(is_callable(['A', 'unserialize']));
|
|
A::serialize();
|
|
A::unserialize();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
bool(true)
|
|
bool(true)
|
|
|
|
Deprecated: Non-static method A::serialize() should not be called statically in %s on line %d
|
|
|
|
Deprecated: Non-static method A::unserialize() should not be called statically in %s on line %d
|