1*fb347f35SAndreas Gohr<?php 2*fb347f35SAndreas Gohr 3*fb347f35SAndreas Gohr// platform_check.php @generated by Composer 4*fb347f35SAndreas Gohr 5*fb347f35SAndreas Gohr$issues = array(); 6*fb347f35SAndreas Gohr 7*fb347f35SAndreas Gohrif (!(PHP_VERSION_ID >= 70100)) { 8*fb347f35SAndreas Gohr $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.'; 9*fb347f35SAndreas Gohr} 10*fb347f35SAndreas Gohr 11*fb347f35SAndreas Gohrif ($issues) { 12*fb347f35SAndreas Gohr if (!headers_sent()) { 13*fb347f35SAndreas Gohr header('HTTP/1.1 500 Internal Server Error'); 14*fb347f35SAndreas Gohr } 15*fb347f35SAndreas Gohr if (!ini_get('display_errors')) { 16*fb347f35SAndreas Gohr if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 17*fb347f35SAndreas Gohr fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); 18*fb347f35SAndreas Gohr } elseif (!headers_sent()) { 19*fb347f35SAndreas 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; 20*fb347f35SAndreas Gohr } 21*fb347f35SAndreas Gohr } 22*fb347f35SAndreas Gohr trigger_error( 23*fb347f35SAndreas Gohr 'Composer detected issues in your platform: ' . implode(' ', $issues), 24*fb347f35SAndreas Gohr E_USER_ERROR 25*fb347f35SAndreas Gohr ); 26*fb347f35SAndreas Gohr} 27