3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = '=?UTF-8?Q?=c3=b8en?='; echo "$input\n"; $output = ''; foreach(imap_mime_header_decode($input) as $element){ if($element->charset == 'utf-8'){ echo "utf8 = $element->text\n"; $output .= $element->text; } else{ echo "default = $element->text\n"; $output .= $element->text; } } $string = preg_replace('/[^a-zæøåA-ZÆØÅ0-9 \-\.,:]/', '', $output); echo "$string\n"; echo strlen($string);
based on UiauT
Output for 7.0.0 - 7.2.0
=?UTF-8?Q?=c3=b8en?= Fatal error: Uncaught Error: Call to undefined function imap_mime_header_decode() in /in/AXAdo:5 Stack trace: #0 {main} thrown in /in/AXAdo on line 5
Process exited with code 255.
Output for 5.3.20 - 5.6.28
=?UTF-8?Q?=c3=b8en?= Fatal error: Call to undefined function imap_mime_header_decode() in /in/AXAdo on line 5
Process exited with code 255.