Files

22 lines
1.1 KiB
PHP
Raw Permalink Normal View History

<?php
// arm64-parity-probe.php - facts that must be IDENTICAL between the existing amd64 image and the
// arm64 image attached to the same tag (version, SAPI, loaded extensions + versions, every ini
// value). Run twice by arm64-attach.yaml: `lsphp probe.php` (image config) and
// `lsphp -n probe.php` (compiled-in defaults only, e.g. session.upload_progress.enabled).
// Output is plain text so a failed parity check prints a readable diff. No timestamps/paths of
// the build host: only things a customer's PHP can observe.
echo 'PHP_VERSION=', PHP_VERSION, "\n";
echo 'PHP_VERSION_ID=', PHP_VERSION_ID, "\n";
echo 'SAPI=', php_sapi_name(), "\n";
echo 'ZTS=', (PHP_ZTS ? 1 : 0), ' DEBUG=', (PHP_DEBUG ? 1 : 0), ' INT_SIZE=', PHP_INT_SIZE, "\n";
echo 'EXTENSION_DIR=', ini_get('extension_dir'), "\n";
$ext = get_loaded_extensions();
sort($ext, SORT_STRING);
foreach ($ext as $e) {
echo 'ext ', $e, ' ', (phpversion($e) ?: '-'), "\n";
}
$ini = ini_get_all(null, false);
ksort($ini, SORT_STRING);
foreach ($ini as $k => $v) {
echo 'ini ', $k, '=', var_export($v, true), "\n";
}