3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sir_title1 = array("ă", "Ă", "î", "Î", "ş", "ș", "Ş", "ţ", "Ţ", "â", "Â", "„", "“", " ", ",", ".", "”", "«", "»", "–", "?"); $sir_title2 = array("a", "A", "i", "I", "s", "s", "S", "t", "T", "a", "A", "", "", "-", "-", "-", "", "", "", "-", ""); $string = "Francezul care a făcut aproape 9 miliarde într-un an la Botoșani, a ciocănit într-un hotel la porțile raiului – VIDEO & GALERIE FOTO"; //print (str_replace($sir_title1, $sir_title2, $string)); $string= mb_convert_encoding($string, 'UTF-8', 'UTF-8'); print (iconv('UTF-8', 'Windows-1252', $string));
Output for 8.0.14 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Warning: iconv(): Wrong encoding, conversion from "UTF-8" to "Windows-1252" is not allowed in /in/2pR6t on line 12
Output for 7.3.32 - 7.3.33, 7.4.33, 8.0.13
Fatal error: Uncaught Error: Call to undefined function iconv() in /in/2pR6t:12 Stack trace: #0 {main} thrown in /in/2pR6t on line 12
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.25, 8.0.0 - 8.0.12
Notice: iconv(): Detected an illegal character in input string in /in/2pR6t on line 12
Output for 7.4.26 - 7.4.32
Notice: iconv(): Wrong charset, conversion from `UTF-8' to `Windows-1252' is not allowed in /in/2pR6t on line 12

preferences:
234.84 ms | 401 KiB | 331 Q