1
0
mirror of https://github.com/php/php-src.git synced 2026-04-05 07:02:33 +02:00

Fix test case for Windows

This commit is contained in:
Christoph M. Becker
2019-11-11 12:48:17 +01:00
parent 60081ca20d
commit ce047e6091

View File

@@ -6,7 +6,13 @@ Bug #78714 (funcs returning pointer can't use call convention spec)
ffi.enable=1
--FILE--
<?php
$ffi = FFI::cdef('char * __cdecl get_zend_version(void);');
$def = 'char * __cdecl get_zend_version(void);';
if (substr(PHP_OS, 0, 3) != 'WIN') {
$ffi = FFI::cdef($def);
} else {
$dll = 'php7' . (PHP_ZTS ? 'ts' : '') . (PHP_DEBUG ? '_debug' : '') . '.dll';
$ffi = FFI::cdef($def, $dll);
}
echo substr(FFI::string($ffi->get_zend_version()), 0, 4) . "\n";
?>
--EXPECT--