3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = iconv("utf-8", "cp1251", "/-[а-я]+=/"); $rei = iconv("utf-8", "cp1251", "/-[а-я]+=/i"); $RE = iconv("utf-8", "cp1251", "/-[а-яА-Я]+=/"); $str = iconv("utf-8", "cp1251", "-Превед="); var_dump(mb_convert_encoding("utf-8", "cp1251", "-Превед=")); var_dump($str); var_dump(mb_detect_encoding($str, "auto", true)); var_dump($re, preg_match($re, $str)); var_dump($rei, preg_match($rei, $str)); var_dump($RE, preg_match($RE, $str));
Output for git.master, git.master_jit, rfc.property-hooks
Warning: iconv(): Wrong encoding, conversion from "utf-8" to "cp1251" is not allowed in /in/W9XNe on line 2 Warning: iconv(): Wrong encoding, conversion from "utf-8" to "cp1251" is not allowed in /in/W9XNe on line 3 Warning: iconv(): Wrong encoding, conversion from "utf-8" to "cp1251" is not allowed in /in/W9XNe on line 4 Warning: iconv(): Wrong encoding, conversion from "utf-8" to "cp1251" is not allowed in /in/W9XNe on line 5 Fatal error: Uncaught ValueError: mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "-Превед=" in /in/W9XNe:6 Stack trace: #0 /in/W9XNe(6): mb_convert_encoding('utf-8', 'cp1251', '-\xD0\x9F\xD1\x80\xD0\xB5\xD0\xB2\xD0\xB5\xD0\xB4=') #1 {main} thrown in /in/W9XNe on line 6
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
49.42 ms | 402 KiB | 8 Q