3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Fuente: https://gist.github.com/gcoop/701814 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('-','&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('¿Complot contra la "Pulga"? Las fotos de Messi en Las Vegas serían "truchas" - ¿Creés que las imágenes son verdaderas o es una campaña contra el ídolo?');

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.0110.01116.75
8.3.50.0110.00616.65
8.3.40.0040.01118.84
8.3.30.0120.00318.79
8.3.20.0080.00018.74
8.3.10.0040.00420.65
8.3.00.0000.00819.51
8.2.180.0100.00716.75
8.2.170.0140.00022.96
8.2.160.0070.00721.07
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00826.16
8.2.120.0050.00320.71
8.2.110.0000.00920.34
8.2.100.0070.00717.74
8.2.90.0050.00319.05
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0030.00617.93
8.2.50.0000.00818.10
8.2.40.0030.00518.22
8.2.30.0080.00019.44
8.2.20.0000.00717.58
8.2.10.0040.00417.55
8.2.00.0040.00417.56
8.1.280.0140.00725.92
8.1.270.0060.00324.66
8.1.260.0090.00626.35
8.1.250.0050.00328.09
8.1.240.0060.00322.62
8.1.230.0040.00817.64
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0040.00417.22
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0050.00318.47
8.1.160.0040.00418.68
8.1.150.0000.00818.55
8.1.140.0000.00717.38
8.1.130.0000.00717.73
8.1.120.0030.00317.30
8.1.110.0000.00717.39
8.1.100.0000.00717.23
8.1.90.0040.00417.24
8.1.80.0050.00217.29
8.1.70.0040.00417.25
8.1.60.0030.00517.41
8.1.50.0080.00017.30
8.1.40.0040.00417.34
8.1.30.0040.00417.50
8.1.20.0000.00817.43
8.1.10.0030.00617.39
8.1.00.0000.00717.33
8.0.300.0050.00218.77
8.0.290.0040.00416.75
8.0.280.0040.00418.39
8.0.270.0030.00316.83
8.0.260.0030.00316.84
8.0.250.0000.00616.93
8.0.240.0060.00316.95
8.0.230.0070.00016.88
8.0.220.0070.00016.82
8.0.210.0040.00416.77
8.0.200.0030.00316.85
8.0.190.0050.00316.91
8.0.180.0000.00716.80
8.0.170.0030.00616.93
8.0.160.0000.00716.96
8.0.150.0030.00616.82
8.0.140.0040.00416.74
8.0.130.0000.00613.28
8.0.120.0030.00516.86
8.0.110.0040.00416.89
8.0.100.0040.00416.70
8.0.90.0030.00616.90
8.0.80.0090.00616.94
8.0.70.0000.00716.89
8.0.60.0040.00416.88
8.0.50.0040.00416.88
8.0.30.0090.01016.96
8.0.20.0110.00716.93
8.0.10.0000.00816.89
8.0.00.0090.01416.78
7.4.330.0050.00012.88
7.4.320.0000.00616.40
7.4.300.0000.00716.37
7.4.290.0030.00316.36
7.4.280.0080.00016.40
7.4.270.0070.00016.46
7.4.260.0000.00713.29
7.4.250.0040.00416.50
7.4.240.0020.00516.51
7.4.230.0030.00316.42
7.4.220.0130.00316.46
7.4.210.0080.00816.59
7.4.200.0040.00416.61
7.4.190.0070.00016.75
7.4.160.0000.01516.50
7.4.150.0030.01516.73
7.4.140.0070.01016.48
7.4.130.0090.00916.42
7.4.120.0090.00916.60
7.4.110.0060.01016.60
7.4.100.0100.00616.45
7.4.90.0120.00616.34
7.4.80.0130.00619.39
7.4.70.0130.00316.69
7.4.60.0100.00716.44
7.4.50.0080.00516.45
7.4.40.0030.01116.51
7.4.30.0120.00416.48
7.4.00.0100.00715.06
7.3.330.0000.00613.11
7.3.320.0030.00313.25
7.3.310.0030.00316.06
7.3.300.0000.00616.29
7.3.290.0090.00916.24
7.3.280.0050.01216.21
7.3.270.0120.00616.26
7.3.260.0190.00016.27
7.3.250.0170.00316.40
7.3.240.0080.01116.41
7.3.230.0140.00416.52
7.3.210.0060.01116.48
7.3.200.0140.00616.12
7.3.190.0180.00316.51
7.3.180.0000.01516.17
7.3.170.0060.01116.43
7.3.160.0100.00616.63
7.3.120.0030.01214.80
7.3.110.0100.01014.77
7.3.100.0090.00314.89
7.3.90.0040.00814.66
7.3.80.0120.00314.86
7.3.70.0030.01014.82
7.3.60.0040.01114.78
7.3.50.0030.00614.82
7.3.40.0030.01014.86
7.3.30.0070.00714.59
7.3.20.0040.00716.71
7.3.10.0050.00716.32
7.3.00.0040.00516.42
7.2.330.0170.00316.66
7.2.320.0120.00916.75
7.2.310.0140.00316.63
7.2.300.0030.01416.72
7.2.290.0130.00316.70
7.2.250.0070.01115.23
7.2.240.0110.00714.77
7.2.230.0030.01315.12
7.2.220.0060.01315.17
7.2.210.0060.01214.74
7.2.200.0090.00314.82
7.2.190.0070.00715.06
7.2.180.0100.00314.75
7.2.170.0040.01114.64
7.2.160.0060.00614.57
7.2.150.0060.00617.06
7.2.140.0070.00717.03
7.2.130.0060.00816.83
7.2.120.0070.00616.67
7.2.110.0080.00816.79
7.2.100.0070.00316.61
7.2.90.0050.00816.70
7.2.80.0060.00816.90
7.2.70.0070.00416.85
7.2.60.0050.01016.58
7.2.50.0070.00516.69
7.2.40.0080.00516.63
7.2.30.0100.00116.88
7.2.20.0060.00616.65
7.2.10.0080.00716.80
7.2.00.0080.00516.81
7.1.330.0100.00715.80
7.1.320.0000.01515.37
7.1.310.0080.00515.88
7.1.300.0060.01015.81
7.1.290.0070.00715.71
7.1.280.0030.00615.75
7.1.270.0000.01115.76
7.1.260.0110.00315.80
7.1.250.0030.01015.44
7.1.240.0090.00615.80
7.1.230.0000.01015.76
7.1.220.0070.00715.65
7.1.210.0030.01515.73
7.1.200.0060.00915.52
7.1.190.0090.00315.70
7.1.180.0000.00915.71
7.1.170.0040.00415.82
7.1.160.0040.00415.75
7.1.150.0040.00715.85
7.1.140.0000.00815.68
7.1.130.0100.00315.44
7.1.120.0000.00815.65
7.1.110.0040.01115.83
7.1.100.0060.00615.57
7.1.90.0040.00815.76
7.1.80.0030.00715.90
7.1.70.0080.00316.34
7.1.60.0100.01117.48
7.1.50.0130.00716.39
7.1.40.0030.00615.82
7.1.30.0070.00715.83
7.1.20.0030.00915.71
7.1.10.0080.00415.72
7.1.00.0010.02119.04
7.0.330.0070.00715.44
7.0.320.0000.01315.35
7.0.310.0060.00315.30
7.0.300.0060.00915.23
7.0.290.0040.00715.34
7.0.280.0030.00615.43
7.0.270.0000.00815.12
7.0.260.0000.01315.38
7.0.250.0030.00615.45
7.0.240.0050.00515.39
7.0.230.0030.00715.18
7.0.220.0000.00915.39
7.0.210.0040.00715.24
7.0.200.0030.00816.04
7.0.190.0060.01015.30
7.0.180.0100.00015.29
7.0.170.0070.00715.43
7.0.160.0060.01015.16
7.0.150.0030.01015.34
7.0.140.0050.03818.59
7.0.130.0030.01315.53
7.0.120.0050.04218.70
7.0.110.0110.00615.41
7.0.100.0030.00714.93
7.0.90.0060.00315.27
7.0.80.0110.00315.25
7.0.70.0100.00315.48
7.0.60.0080.04217.69
7.0.50.0070.03016.49
7.0.40.0050.03816.91
7.0.30.0170.04216.76
7.0.20.0150.03716.74
7.0.10.0140.02716.85
7.0.00.0090.04216.76
5.6.400.0000.01114.27
5.6.390.0130.00314.21
5.6.380.0070.01014.19
5.6.370.0030.00614.63
5.6.360.0000.01414.43
5.6.350.0050.00514.20
5.6.340.0030.01414.20
5.6.330.0040.00714.40
5.6.320.0080.00014.57
5.6.310.0030.01314.61
5.6.300.0030.00914.29
5.6.290.0000.00814.25
5.6.280.0110.00714.52
5.6.270.0100.00314.49
5.6.260.0080.00414.50
5.6.250.0030.01014.27
5.6.240.0000.01314.05
5.6.230.0060.01014.05
5.6.220.0060.00914.55
5.6.210.0100.02817.63
5.6.200.0070.04216.17
5.6.190.0030.02717.37
5.6.180.0230.03317.47
5.6.170.0140.03417.37
5.6.160.0050.03217.20
5.6.150.0050.02616.30
5.6.140.0120.03716.32
5.6.130.0070.02116.32
5.6.120.0090.04117.64
5.6.110.0080.04517.61
5.6.100.0050.04317.63
5.6.90.0080.04517.51
5.6.80.0070.04317.25
5.6.70.0200.02317.40
5.6.60.0000.01614.12
5.6.50.0070.00714.22
5.6.40.0040.00714.20
5.6.30.0030.00714.31
5.6.20.0060.00614.11
5.6.10.0040.01414.16
5.6.00.0060.01214.13
5.5.380.0100.00614.15
5.5.370.0040.00814.36
5.5.360.0000.01013.90
5.5.350.0200.04217.25
5.5.340.0030.04515.92
5.5.330.0050.02317.10
5.5.320.0080.02717.25
5.5.310.0190.04117.14
5.5.300.0050.02516.06
5.5.290.0070.03216.21
5.5.280.0110.03817.48
5.5.270.0080.04117.52
5.5.260.0010.02617.45
5.5.250.0070.04517.51
5.5.240.0060.04217.22
5.5.230.0100.00314.27
5.5.220.0040.00714.05
5.5.210.0070.00714.28
5.5.200.0040.00714.22
5.5.190.0000.01613.99
5.5.180.0070.01014.27
5.5.170.0070.00714.11
5.5.160.0060.00914.19
5.5.150.0030.00914.21
5.5.140.0080.00014.00
5.5.130.0030.01014.24
5.5.120.0030.01314.29
5.5.110.0060.00914.18
5.5.100.0070.00314.27
5.5.90.0000.01213.79
5.5.80.0000.01413.99
5.5.70.0070.01014.29
5.5.60.0100.00614.05
5.5.50.0060.00314.32
5.5.40.0110.00314.19
5.5.30.0000.01414.32
5.5.20.0000.01014.16
5.5.10.0000.01414.07
5.5.00.0070.01014.32
5.4.450.0050.02716.23
5.4.440.0050.04116.21
5.4.430.0070.02016.26
5.4.420.0090.01816.32
5.4.410.0060.04316.22
5.4.400.0120.01716.05
5.4.390.0020.02516.19
5.4.380.0070.04016.13
5.4.370.0030.03216.17
5.4.360.0050.04416.18
5.4.350.0070.02516.06
5.4.340.0060.02316.14
5.4.330.0030.00913.13
5.4.320.0020.02415.99
5.4.310.0100.02315.99
5.4.300.0030.03016.18
5.4.290.0100.04316.05
5.4.280.0030.04116.05
5.4.270.0030.03016.18
5.4.260.0050.04116.14
5.4.250.0090.02416.02
5.4.240.0060.02315.98
5.4.230.0080.03016.02
5.4.220.0050.04316.18
5.4.210.0100.01815.99
5.4.200.0100.03516.18
5.4.190.0030.04316.18
5.4.180.0070.03816.18
5.4.170.0070.02315.98
5.4.160.0050.02416.17
5.4.150.0120.03316.04
5.4.140.0030.03114.78
5.4.130.0070.01814.79
5.4.120.0040.02914.71
5.4.110.0110.03014.81
5.4.100.0030.02814.81
5.4.90.0030.04414.72
5.4.80.0020.02214.76
5.4.70.0080.02014.72
5.4.60.0080.01714.75
5.4.50.0030.02414.82
5.4.40.0080.01814.79
5.4.30.0040.02014.81
5.4.20.0000.02614.79
5.4.10.0050.02014.76
5.4.00.0050.03214.45
5.3.290.0030.02813.95
5.3.280.0050.02713.83
5.3.270.0050.02813.83
5.3.260.0090.03713.89
5.3.250.0050.02613.87
5.3.240.0060.03813.83
5.3.230.0130.03313.87
5.3.220.0050.02513.86
5.3.210.0110.03213.85
5.3.200.0050.03713.89
5.3.190.0050.02313.86
5.3.180.0070.01813.88
5.3.170.0110.01513.87
5.3.160.0020.02813.94
5.3.150.0000.02513.85
5.3.140.0060.02113.86
5.3.130.0000.02513.80
5.3.120.0050.02013.85
5.3.110.0050.02213.92
5.3.100.0040.03413.66
5.3.90.0020.02813.61
5.3.80.0100.03413.53
5.3.70.0050.03213.58
5.3.60.0030.02313.65
5.3.50.0070.02513.56
5.3.40.0030.02313.57
5.3.30.0030.02113.60
5.3.20.0020.02213.43
5.3.10.0000.02213.43
5.3.00.0000.02313.40
5.2.170.0000.03011.31
5.2.160.0030.03011.16
5.2.150.0000.03011.20
5.2.140.0030.03011.17
5.2.130.0030.02711.09
5.2.120.0000.03011.13
5.2.110.0030.03011.17
5.2.100.0030.03311.08
5.2.90.0000.03011.04
5.2.80.0000.03011.12
5.2.70.0070.02311.17
5.2.60.0000.03010.96
5.2.50.0070.03011.20
5.2.40.0030.03310.96
5.2.30.0000.03311.04
5.2.20.0000.03310.98
5.2.10.0070.02310.78
5.2.00.0030.02710.79
5.1.60.0000.02310.16
5.1.50.0030.02310.07
5.1.40.0030.02710.02
5.1.30.0030.03010.36
5.1.20.0000.02710.38
5.1.10.0030.02310.08
5.1.00.0000.02710.13
5.0.50.0000.0208.56
5.0.40.0000.0208.60
5.0.30.0170.0278.38
5.0.20.0070.0278.38
5.0.10.0030.0178.38
5.0.00.0000.0308.38
4.4.90.0030.0138.38
4.4.80.0000.0138.38
4.4.70.0030.0138.38
4.4.60.0030.0138.38
4.4.50.0000.0178.38
4.4.40.0000.0308.38
4.4.30.0030.0138.38
4.4.20.0030.0138.38
4.4.10.0000.0178.38
4.4.00.0000.0238.38
4.3.110.0030.0108.38
4.3.100.0030.0308.38
4.3.90.0000.0138.38
4.3.80.0000.0238.38
4.3.70.0070.0308.38
4.3.60.0000.0378.38
4.3.50.0070.0238.38
4.3.40.0070.0508.38
4.3.30.0030.0278.38
4.3.20.0070.0208.38
4.3.10.0000.0378.38
4.3.00.0000.0338.38

preferences:
65.54 ms | 400 KiB | 5 Q