* Make sure core module has number 0
Some places, possibly also outside PHP, assume the core extension has
module number 0. After 8a812c3fda this wasn't the case anymore as
reported in [1]. Fix it by changing how the next module ID is computed.
[1] https://github.com/php/php-src/pull/12246#issuecomment-1731432377
* Add assertion
* Add test
20 lines
315 B
PHP
20 lines
315 B
PHP
--TEST--
|
|
CLI php -i extension_dir
|
|
--SKIPIF--
|
|
<?php
|
|
include "skipif.inc";
|
|
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
|
die ("skip not for Windows");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$php = getenv('TEST_PHP_EXECUTABLE_ESCAPED');
|
|
$output = `$php -n -i`;
|
|
var_dump(str_contains($output, "extension_dir => "));
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|