mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
`compare` is a required handler [1], but this handler was set to NULL.
Throw an exception when trying to compare FFI objects.
[1] 35c8a010c6/Zend/zend_object_handlers.h (L231C1-L231C64)
Closes GH-16401.
16 lines
255 B
PHP
16 lines
255 B
PHP
--TEST--
|
|
GH-16397 (Segmentation fault when comparing FFI object)
|
|
--EXTENSIONS--
|
|
ffi
|
|
--FILE--
|
|
<?php
|
|
$ffi = FFI::cdef();
|
|
try {
|
|
var_dump($ffi != 1);
|
|
} catch (FFI\Exception $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Cannot compare FFI objects
|