3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cleanse($string) { if (get_magic_quotes_gpc()) { $string = stripslashes($stringIn); } $search = array('ñ', '&acirc;€“','&acirc;€œ','&acirc;€˜','&acirc;€™','&Acirc;&pound;','&Acirc;&not;','&acirc;„&cent;'); $replace = array('&ntilde;', '-','&ldquo;','&lsquo;','&rsquo;','&pound;','&not;','&#8482;'); $string = str_replace($search, $replace, $string); $string = str_replace('&acirc;€', '&rdquo;', $string); $search = array("&#39;", "\xc3\xa2\xc2\x80\xc2\x99", "\xc3\xa2\xc2\x80\xc2\x93", "\xc3\xa2\xc2\x80\xc2\x9d", "\xc3\xa2\x3f\x3f"); $resplace = array("'", "'", ' - ', '"', "'"); $string = str_replace($search, $replace, $string); $quotes = array( "\xC2\xAB" => '"', "\xC2\xBB" => '"', "\xE2\x80\x98" => "'", "\xE2\x80\x99" => "'", "\xE2\x80\x9A" => "'", "\xE2\x80\x9B" => "'", "\xE2\x80\x9C" => '"', "\xE2\x80\x9D" => '"', "\xE2\x80\x9E" => '"', "\xE2\x80\x9F" => '"', "\xE2\x80\xB9" => "'", "\xE2\x80\xBA" => "'", "\xe2\x80\x93" => "-", "\xc2\xb0" => "°", "\xc2\xba" => "°", "\xc3\xb1" => "&#241;", "\x96" => "&#241;", "\xe2\x81\x83" => '&bull;', "\xd5" => "'" ); return strtr($string, $quotes); } echo cleanse('Feliz cumpleaños RatingCero.com: los saludos de los famosos y colegas á'); echo cleanse('técnico de River y tiró: "La re');

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0130.00718.56
8.3.50.0110.00622.05
8.3.40.0070.00718.84
8.3.30.0110.00418.72
8.3.20.0030.00518.73
8.3.10.0040.00421.04
8.3.00.0040.00423.66
8.2.180.0100.01016.75
8.2.170.0100.00722.96
8.2.160.0100.00320.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00321.07
8.2.110.0110.00020.52
8.2.100.0040.00817.78
8.2.90.0030.00619.05
8.2.80.0080.00017.97
8.2.70.0050.00517.63
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0030.00518.03
8.2.30.0070.00319.36
8.2.20.0040.00417.63
8.2.10.0000.00717.70
8.2.00.0050.00317.75
8.1.280.0030.01025.92
8.1.270.0040.00423.99
8.1.260.0120.00626.35
8.1.250.0090.00928.09
8.1.240.0100.01022.33
8.1.230.0090.00320.79
8.1.220.0040.00418.77
8.1.210.0000.00918.79
8.1.200.0060.00317.22
8.1.190.0090.00017.39
8.1.180.0000.00918.10
8.1.170.0080.00018.59
8.1.160.0040.00418.70
8.1.150.0000.00718.47
8.1.140.0000.00817.26
8.1.130.0000.00717.76
8.1.120.0030.00517.26
8.1.110.0050.00217.34
8.1.100.0000.00817.34
8.1.90.0040.00417.28
8.1.80.0000.00717.40
8.1.70.0030.00317.25
8.1.60.0080.00017.50
8.1.50.0050.00217.44
8.1.40.0060.00317.43
8.1.30.0080.00017.53
8.1.20.0030.00617.59
8.1.10.0000.00717.40
8.1.00.0000.00717.47
8.0.300.0030.00519.91
8.0.290.0040.00417.04
8.0.280.0030.00318.27
8.0.270.0030.00317.14
8.0.260.0030.00316.88
8.0.250.0040.00416.96
8.0.240.0030.00616.99
8.0.230.0000.00716.89
8.0.220.0040.00416.84
8.0.210.0070.00016.91
8.0.200.0000.00616.85
8.0.190.0080.00016.89
8.0.180.0040.00416.96
8.0.170.0040.00416.82
8.0.160.0040.00316.88
8.0.150.0060.00316.88
8.0.140.0060.00316.79
8.0.130.0000.00513.35
8.0.120.0040.00416.75
8.0.110.0070.00016.73
8.0.100.0070.00016.87
8.0.90.0040.00416.86
8.0.80.0110.01116.89
8.0.70.0070.00016.79
8.0.60.0040.00416.95
8.0.50.0000.00716.77
8.0.30.0080.01017.27
8.0.20.0110.00717.40
8.0.10.0040.00416.79
8.0.00.0100.01216.76
7.4.330.0000.00516.83
7.4.320.0000.00716.54
7.4.300.0030.00316.41
7.4.290.0000.00716.59
7.4.280.0000.00716.53
7.4.270.0030.00316.64
7.4.260.0000.00513.30
7.4.250.0040.00416.42
7.4.240.0080.00016.52
7.4.230.0030.00316.62
7.4.220.0140.00316.54
7.4.210.0080.00816.60
7.4.200.0040.00416.68
7.4.190.0040.00416.78
7.4.160.0030.01616.63
7.4.150.0070.01717.40
7.4.140.0090.01117.86
7.4.130.0140.00616.49
7.4.120.0080.01016.58
7.4.110.0090.01216.61
7.4.100.0100.00716.49
7.4.90.0120.01216.52
7.4.80.0210.00419.39
7.4.70.0100.01316.49
7.4.60.0210.00916.42
7.4.50.0040.00416.25
7.4.40.0030.01022.77
7.4.30.0040.01516.67
7.4.00.0030.00715.14
7.3.330.0030.00313.18
7.3.320.0030.00313.19
7.3.310.0070.00016.11
7.3.300.0030.00316.12
7.3.290.0090.00916.31
7.3.280.0110.00816.22
7.3.270.0150.00317.40
7.3.260.0110.01018.24
7.3.250.0140.00316.35
7.3.240.0140.00316.59
7.3.230.0110.00716.39
7.3.210.0070.01016.46
7.3.200.0100.01319.39
7.3.190.0160.00016.30
7.3.180.0080.00816.24
7.3.170.0120.00616.50
7.3.160.0090.00616.46
7.3.120.0130.00314.83
7.2.330.0120.01316.70
7.2.320.0130.01016.46
7.2.310.0120.00916.46
7.2.300.0040.01316.56
7.2.290.0100.00616.32
7.2.60.0030.00916.66
7.2.00.0030.00719.16
7.1.200.0090.00015.63
7.1.100.0040.01118.28
7.1.70.0000.01116.78
7.1.60.0040.00817.30
7.1.50.0000.01316.83
7.1.40.0060.00616.61
7.1.30.0040.00916.58
7.1.20.0070.00716.70
7.1.10.0110.00316.48
7.1.00.0040.00716.66
7.0.200.0050.00716.74
7.0.190.0080.00416.55
7.0.180.0020.00716.48
7.0.170.0000.01016.48
7.0.160.0000.00916.48
7.0.150.0040.00416.48
7.0.140.0040.00416.48
7.0.130.0070.00316.61
7.0.120.0000.01016.61
7.0.110.0030.00616.48
7.0.100.0080.00316.53
7.0.90.0000.00916.48
7.0.80.0000.00816.59
7.0.70.0030.01116.48
7.0.60.0000.00816.48
7.0.50.0000.00716.48
7.0.40.0040.00416.48
7.0.30.0070.00316.48
7.0.20.0000.00716.48
7.0.10.0030.01916.48
7.0.00.0070.00016.48
5.6.300.0070.07821.05
5.6.290.0030.07821.00
5.6.280.0070.04021.14
5.6.270.0000.04421.14
5.6.260.0030.05221.03
5.6.250.0070.03920.91
5.6.240.0060.03821.04
5.6.230.0030.05920.96
5.6.220.0000.04620.92
5.6.210.0030.05921.13
5.6.200.0000.04421.09
5.6.190.0000.04820.81
5.6.180.0100.04220.74
5.6.170.0070.04521.00
5.6.160.0030.05120.88
5.6.150.0100.08021.00
5.6.140.0070.04320.98
5.6.130.0070.03921.00
5.6.120.0030.05620.75
5.6.110.0030.04520.86
5.6.100.0060.04821.06
5.6.90.0030.04920.96
5.6.80.0030.04220.30
5.6.70.0100.03420.47
5.6.60.0070.07720.36
5.6.50.0000.04620.26
5.6.40.0030.04320.20
5.6.30.0000.04620.46
5.6.20.0030.04520.24
5.6.10.0100.05520.44
5.6.00.0030.04620.18
5.5.380.0090.04017.54
5.5.370.0000.05017.55
5.5.360.0100.04017.71
5.5.350.0000.04817.53
5.5.340.0000.04418.21
5.5.330.0070.04417.93
5.5.320.0030.05418.22
5.5.310.0000.04218.09
5.5.300.0070.04917.90
5.5.290.0030.04318.08
5.5.280.0000.04918.15
5.5.270.0000.04818.10
5.5.260.0030.04318.10
5.5.250.0000.05417.91
5.5.240.0040.04017.43
5.5.230.0030.04117.16
5.5.220.0030.05017.48
5.5.210.0000.04717.28
5.5.200.0000.05017.50
5.5.190.0030.04517.28
5.5.180.0070.03517.50
5.5.160.0000.04817.16
5.5.150.0000.04017.50
5.5.140.0030.04517.27
5.5.130.0030.04717.27
5.5.120.0070.03317.45
5.5.110.0000.04017.24
5.5.100.0000.04417.38
5.5.90.0070.04217.43
5.5.80.0000.04117.02
5.5.70.0070.04017.41
5.5.60.0160.03817.36
5.5.50.0070.03417.16
5.5.40.0030.04017.42
5.5.30.0030.03717.43
5.5.20.0000.04217.46
5.5.10.0060.03517.27
5.5.00.0040.03917.26
5.4.450.0120.03119.30
5.4.440.0030.04019.37
5.4.430.0060.03919.41
5.4.420.0100.03119.31
5.4.410.0000.04519.36
5.4.400.0030.04219.24
5.4.390.0070.03319.05
5.4.380.0070.03519.12
5.4.370.0070.03719.01
5.4.360.0070.03919.10
5.4.350.0030.04719.14
5.4.340.0030.04018.99
5.4.320.0070.04419.14
5.4.310.0030.03719.23
5.4.300.0030.04019.00
5.4.290.0030.03619.10
5.4.280.0000.06519.22
5.4.270.0030.03618.98
5.4.260.0000.04119.23
5.4.250.0030.04318.96
5.4.240.0030.04119.12
5.4.230.0070.03819.23
5.4.220.0030.04018.96
5.4.210.0040.04019.13
5.4.200.0040.03619.13
5.4.190.0030.03719.02
5.4.180.0070.03719.23
5.4.170.0070.04419.22
5.4.160.0030.03919.08
5.4.150.0070.05119.00
5.4.140.0030.03616.48
5.4.130.0030.04016.57
5.4.120.0030.04316.73
5.4.110.0090.03816.74
5.4.100.0000.04116.79
5.4.90.0030.03716.59
5.4.80.0030.03616.68
5.4.70.0000.04416.69
5.4.60.0090.03116.67
5.4.50.0030.03416.66
5.4.40.0000.03816.69
5.4.30.0140.04216.59
5.4.20.0000.04116.59
5.4.10.0030.04416.68
5.4.00.0070.03316.48
5.3.290.0030.03816.48
5.3.280.0030.04216.48
5.3.270.0060.03516.48
5.3.260.0070.03416.48
5.3.250.0100.04116.48
5.3.240.0070.03116.48
5.3.230.0000.04616.48
5.3.220.0070.04416.48
5.3.210.0030.04016.48
5.3.200.0040.03916.48
5.3.190.0040.03916.48
5.3.180.0030.03816.48
5.3.170.0030.04016.48
5.3.160.0030.04116.48
5.3.150.0000.04816.48
5.3.140.0100.03616.48
5.3.130.0030.03816.48
5.3.120.0000.04416.48
5.3.110.0060.04016.48
5.3.100.0000.04316.48
5.3.90.0200.05016.48
5.3.80.0030.04016.48
5.3.70.0030.03316.48
5.3.60.0030.03516.48
5.3.50.0070.07616.48
5.3.40.0030.03416.48
5.3.30.0130.04016.48
5.3.20.0100.02916.48
5.3.10.0000.05616.48
5.3.00.0030.04716.48
5.2.170.0060.03916.48
5.2.160.0000.03116.48
5.2.150.0030.04516.48
5.2.140.0000.03116.48
5.2.130.0060.03816.48
5.2.120.0070.03616.48
5.2.110.0000.03116.48
5.2.100.0030.03116.48
5.2.90.0000.03216.48
5.2.80.0000.03316.48
5.2.70.0040.03516.48
5.2.60.0000.04716.48
5.2.50.0030.02716.48
5.2.40.0030.02716.48
5.2.30.0060.02816.48
5.2.20.0030.02916.48
5.2.10.0030.02916.48
5.2.00.0000.03016.48
5.1.60.0000.02716.48
5.1.50.0030.02316.48
5.1.40.0100.03616.48
5.1.30.0070.03316.48
5.1.20.0000.03616.48
5.1.10.0030.04516.48
5.1.00.0030.03416.48
5.0.50.0030.01916.48
5.0.40.0060.02316.48
5.0.30.0030.03116.48
5.0.20.0000.02116.48
5.0.10.0030.02616.48
5.0.00.0030.03116.48
4.4.90.0030.01416.48
4.4.80.0030.01916.48
4.4.70.0000.02016.48
4.4.60.0060.02316.48
4.4.50.0040.01416.48
4.4.40.0000.02516.48
4.4.30.0000.01816.48
4.4.20.0000.01616.48
4.4.10.0030.01916.48
4.4.00.0000.02716.48
4.3.110.0030.02116.48
4.3.100.0000.01816.48
4.3.90.0030.01316.48
4.3.80.0090.01616.48
4.3.70.0000.01616.48
4.3.60.0000.01616.48
4.3.50.0000.01916.48
4.3.40.0030.02216.48
4.3.30.0000.02216.48
4.3.20.0070.01016.48
4.3.10.0040.01816.48
4.3.00.0030.01316.48

preferences:
44.72 ms | 401 KiB | 5 Q