3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testcase = 'DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trello.com; q=dns/txt; s=dkim; bh=zmLkmznXksSFNlY+E/SQwF4vaDducoC91+u20p18W38=; h=from:sender:subject:to:mime-version:content-type; b=XFKjy/g96z0Iv8qDg+IPb4EXYSujEVf/indwAV64icAXv/wceXEgQPLXury2HKBn5/Tk7DbgU HW4duCjde16IKgMOd5xf7n8duXbzhEESD5a3CXSo9QNOjYH1hwsdx8oguz+RWL3Zw4ZJfXjGCzS +LMZig06tV0tF8zFTuAHfRY= Content-Type: multipart/alternative; boundary="----sinikael-?=_1-14883656976170.4675149679677584'; function test($name, array $headers) { echo 'Test in mode "' . $name . '": '; if (isset($headers['Content-Type'])) { echo "OK!\n"; } else { echo "Content-Type header not found:\n"; print_r($headers); } } test('strict', iconv_mime_decode_headers($testcase, ICONV_MIME_DECODE_STRICT, 'utf-8')); test('continue', iconv_mime_decode_headers($testcase, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'utf-8'));
Output for 7.1.25, 7.2.10 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.30, 8.0.0 - 8.0.12, 8.0.14 - 8.0.22, 8.1.0 - 8.1.9
Test in mode "strict": OK! Test in mode "continue": OK!
Output for 7.3.32 - 7.3.33, 8.0.13
Fatal error: Uncaught Error: Call to undefined function iconv_mime_decode_headers() in /in/nfLjB:24 Stack trace: #0 {main} thrown in /in/nfLjB on line 24
Process exited with code 255.
Output for 7.0.0 - 7.0.27, 7.1.0 - 7.1.20, 7.2.0 - 7.2.9
Test in mode "strict": OK! Test in mode "continue": Content-Type header not found: Array ( [DKIM-Signature] => v=1; a=rsa-sha256; c=relaxed/relaxed; d=trello.com; q=dns/txt; s=dkim; bh=zmLkmznXksSFNlY+E/SQwF4vaDducoC91+u20p18W38=; h=from:sender:subject:to:mime-version:content-type; b=XFKjy/g96z0Iv8qDg+IPb4EXYSujEVf/indwAV64icAXv/wceXEgQPLXury2HKBn5/Tk7DbgU HW4duCjde16IKgMOd5xf7n8duXbzhEESD5a3CXSo9QNOjYH1hwsdx8oguz+RWL3Zw4ZJfXjGCzS +LMZig06tV0tF8zFTuAHfRY= Content-Type: multipart/alternative; boundary="----sinikael-?=_1-14883656976170.4675149679677584 )

preferences:
54.05 ms | 413 KiB | 5 Q