16cb05674SAndreas Gohr<?php 26cb05674SAndreas Gohr 36cb05674SAndreas Gohr// platform_check.php @generated by Composer 46cb05674SAndreas Gohr 56cb05674SAndreas Gohr$issues = array(); 66cb05674SAndreas Gohr 7*64d8abdbSAndreas Gohrif (!(PHP_VERSION_ID >= 70400)) { 8*64d8abdbSAndreas Gohr $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; 96cb05674SAndreas Gohr} 106cb05674SAndreas Gohr 116cb05674SAndreas Gohrif ($issues) { 126cb05674SAndreas Gohr if (!headers_sent()) { 136cb05674SAndreas Gohr header('HTTP/1.1 500 Internal Server Error'); 146cb05674SAndreas Gohr } 156cb05674SAndreas Gohr if (!ini_get('display_errors')) { 166cb05674SAndreas Gohr if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 176cb05674SAndreas Gohr fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); 186cb05674SAndreas Gohr } elseif (!headers_sent()) { 196cb05674SAndreas Gohr echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; 206cb05674SAndreas Gohr } 216cb05674SAndreas Gohr } 226cb05674SAndreas Gohr trigger_error( 236cb05674SAndreas Gohr 'Composer detected issues in your platform: ' . implode(' ', $issues), 246cb05674SAndreas Gohr E_USER_ERROR 256cb05674SAndreas Gohr ); 266cb05674SAndreas Gohr} 27