3v4l.org

run code in 300+ PHP versions simultaneously
<?php $conf['search_description'] = 160; $keywords = array('maison', 'vente', 'mornagia', 'manouba', '2013'); $description = 'Agence immobilière Dossenheim met en vente duplex a Jdaida d’une superficie 100m² composée d’un salon ,salle à manger, cuisine, 3 chambres à coucher, salle de bain et une salle d’eau ,d’un prix négociable 70MDT avec titre foncier indépendant Pour tout contact'; $plussize = 20; $snippet = ''; $to=0; $entre=0; //$description = utf8_decode($description); if(strlen($description) > $conf['search_description']) { $entre=0; for ($c = 0; $c < count($keywords); $c++) { $current_keyword = $keywords[$c]; $keyword_pos = strpos(strtolower($description), $current_keyword); if($keyword_pos === false) $ddddd=1; //anything else { $entre+=1; $from = max(intval($keyword_pos - $plussize),0,$to); $to = min(intval($keyword_pos + strlen($current_keyword) + $plussize),strlen($description)-1); if ($from>0) $part = '...'; else $part = ''; $part .= mb_substr($description, $from, $to); if(preg_match('/\s/', $part, $m, PREG_OFFSET_CAPTURE)) { $p1 = $m[0][1]+1; } else { $p1 = 0; } if(preg_match('/\s+(?=\S*+$)/', $part, $m, PREG_OFFSET_CAPTURE)) { $p2 = $m[0][1]; } else { $p2 = 0; } //$p1 = (strpos($part,' ')=== false)?0:mb_strpos($part,' ')+1; //$p2 = (strrpos($part,' ')=== false)?0:mb_strrpos($part,' '); $snippet .= '[' . substr($part, $p1, $p2) . ']'; if ($to<strlen($description)-1) $snippet .= '...'; } } if(strlen($snippet)< $conf['search_description'] && $to>0 && $to<$conf['search_description'] ) $snippet = $snippet . mb_substr($description,$to,strlen($description)-1, 'UTF-8'); if(strlen($snippet)>0) $description = $snippet; } echo $description;

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.0120.00318.55
8.3.50.0100.00617.51
8.3.40.0100.01018.98
8.3.30.0040.01119.08
8.3.20.0060.00319.03
8.3.10.0090.00018.81
8.3.00.0090.00019.51
8.2.180.0100.01016.75
8.2.170.0000.01522.96
8.2.160.0040.01118.88
8.2.150.0090.00024.18
8.2.140.0070.01124.66
8.2.130.0060.01226.16
8.2.120.0080.00019.61
8.2.110.0030.00620.47
8.2.100.0120.00017.91
8.2.90.0050.00317.74
8.2.80.0000.00819.08
8.2.70.0080.00317.88
8.2.60.0000.00818.05
8.2.50.0030.00518.07
8.2.40.0060.00318.16
8.2.30.0060.00317.84
8.2.20.0030.00717.86
8.2.10.0000.00817.87
8.2.00.0040.00417.81
8.1.280.0120.00925.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0120.00923.73
8.1.230.0090.00322.16
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0100.00017.60
8.1.190.0030.00517.35
8.1.180.0030.00518.10
8.1.170.0050.00318.79
8.1.160.0040.00419.07
8.1.150.0000.00818.73
8.1.140.0000.00917.62
8.1.130.0000.00717.59
8.1.120.0070.00017.61
8.1.110.0000.01117.53
8.1.100.0050.00317.67
8.1.90.0070.00017.52
8.1.80.0000.00717.52
8.1.70.0030.00317.61
8.1.60.0030.00517.73
8.1.50.0000.00817.67
8.1.40.0030.00617.66
8.1.30.0030.00517.79
8.1.20.0080.00017.88
8.1.10.0000.00817.75
8.1.00.0040.00417.63
8.0.300.0000.00718.77
8.0.290.0040.00417.00
8.0.280.0040.00418.48
8.0.270.0000.00717.25
8.0.260.0030.00317.05
8.0.250.0000.00717.13
8.0.240.0030.00317.20
8.0.230.0040.00417.18
8.0.220.0080.00017.13
8.0.210.0030.00317.09
8.0.200.0070.00317.21
8.0.190.0080.00017.10
8.0.180.0100.00017.19
8.0.170.0030.00517.13
8.0.160.0000.00717.19
8.0.150.0050.00317.00
8.0.140.0000.01116.91
8.0.130.0060.00013.57
8.0.120.0040.00417.10
8.0.110.0020.00517.01
8.0.100.0000.00717.17
8.0.90.0050.00217.07
8.0.80.0060.00917.08
8.0.70.0050.00217.18
8.0.60.0030.00517.15
8.0.50.0030.00617.08
8.0.30.0090.00917.36
8.0.20.0140.00817.34
8.0.10.0040.00417.22
8.0.00.0120.00617.14
7.4.330.0050.00013.29
7.4.320.0030.00316.75
7.4.300.0000.00616.84
7.4.290.0030.00316.75
7.4.280.0050.00316.83
7.4.270.0000.00716.81
7.4.260.0050.00013.51
7.4.250.0080.00016.75
7.4.240.0000.00716.84
7.4.230.0070.00016.78
7.4.220.0070.01516.64
7.4.210.0170.00316.79
7.4.200.0030.00616.88
7.4.190.0040.00416.62
7.4.160.0100.00616.77
7.4.150.0090.00916.67
7.4.140.0100.01016.56
7.4.130.0080.00916.62
7.4.120.0100.00716.65
7.4.110.0180.00016.91
7.4.100.0150.00316.93
7.4.90.0060.01316.82
7.4.80.0150.00719.39
7.4.70.0130.00316.77
7.4.60.0040.01416.68
7.4.50.0040.00016.79
7.4.40.0090.00516.76
7.4.30.0130.00316.85
7.4.10.0030.00916.82
7.4.00.0060.01015.88
7.3.330.0030.00313.25
7.3.320.0030.00513.40
7.3.310.0040.00416.37
7.3.300.0000.00716.41
7.3.290.0070.00816.50
7.3.280.0130.00416.52
7.3.270.0110.00616.82
7.3.260.0040.01216.56
7.3.250.0240.00916.50
7.3.240.0100.00716.54
7.3.230.0140.00316.63
7.3.210.0070.01116.79
7.3.200.0150.00616.51
7.3.190.0130.00716.64
7.3.180.0100.00716.73
7.3.170.0060.01516.54
7.3.160.0070.01016.46
7.3.130.0100.01016.62
7.3.120.0100.00715.88
7.3.110.0030.01316.34
7.3.100.0090.00916.46
7.3.90.0120.00316.38
7.3.80.0030.01316.48
7.3.70.0070.01016.50
7.3.60.0080.01116.63
7.3.50.0030.01316.46
7.3.40.0060.01016.47
7.3.30.0070.01016.67
7.3.20.0030.01018.18
7.3.10.0080.00818.34
7.3.00.0060.01018.33
7.2.330.0070.01016.98
7.2.320.0070.01016.84
7.2.310.0060.01516.81
7.2.300.0140.00616.82
7.2.290.0100.00716.96
7.2.260.0100.01016.75
7.2.250.0080.01216.67
7.2.240.0130.00916.77
7.2.230.0030.01716.77
7.2.220.0090.01216.77
7.2.210.0090.00616.89
7.2.200.0030.01416.74
7.2.190.0160.00316.80
7.2.180.0030.00916.74
7.2.170.0100.00716.76
7.2.160.0040.01116.63
7.2.150.0060.01318.68
7.2.140.0100.00618.68
7.2.130.0060.00918.57
7.2.120.0060.01218.59
7.2.110.0170.00318.52
7.2.100.0060.01218.56
7.2.90.0030.01518.34
7.2.80.0090.00918.39
7.2.70.0160.00418.42
7.2.60.0140.01118.63
7.2.50.0170.00518.54
7.2.40.0190.01118.52
7.2.30.0150.00718.72
7.2.20.0120.00918.70
7.2.10.0080.01218.61
7.2.00.0050.01019.12
7.1.330.0120.00917.50
7.1.320.0090.00917.27
7.1.310.0080.01317.46
7.1.300.0120.00317.38
7.1.290.0000.01817.56
7.1.280.0030.01217.61
7.1.270.0100.00717.52
7.1.260.0080.00817.46
7.1.250.0040.01117.43
7.1.240.0060.01217.64
7.1.230.0110.00717.15
7.1.220.0070.01117.21
7.1.210.0060.00917.35
7.1.200.0110.00317.46
7.1.190.0000.01617.52
7.1.180.0040.01717.57
7.1.170.0150.00917.49
7.1.160.0190.00317.56
7.1.150.0120.00817.57
7.1.140.0100.01017.45
7.1.130.0120.00717.58
7.1.120.0000.01917.36
7.1.110.0140.00317.47
7.1.100.0090.00817.98
7.1.90.0100.00717.48
7.1.80.0080.01217.34
7.1.70.0080.00717.51
7.1.60.0130.00718.40
7.1.50.0090.01217.11
7.1.40.0030.01517.38
7.1.30.0030.01417.46
7.1.20.0030.01517.43
7.1.10.0030.01017.41
7.1.00.0060.04319.82
7.0.330.0040.01217.11
7.0.320.0140.00417.02
7.0.310.0170.00717.03
7.0.300.0160.00416.98
7.0.290.0170.00217.16
7.0.280.0000.01317.07
7.0.270.0060.01316.93
7.0.260.0040.01316.71
7.0.250.0070.01117.00
7.0.240.0060.00917.09
7.0.230.0040.01417.10
7.0.220.0070.01116.92
7.0.210.0100.01017.35
7.0.200.0050.00917.07
7.0.190.0120.00617.27
7.0.180.0080.00816.84
7.0.170.0030.01317.31
7.0.160.0120.00317.17
7.0.150.0080.00817.01
7.0.140.0030.04619.70
7.0.130.0090.00617.08
7.0.120.0090.03319.58
7.0.110.0100.01017.29
7.0.100.0030.01617.04
7.0.90.0090.00916.92
7.0.80.0100.00517.23
7.0.70.0120.00616.97
7.0.60.0080.04518.53
7.0.50.0040.04417.48
7.0.40.0080.02717.64
7.0.30.0070.03017.52
7.0.20.0120.04517.73
7.0.10.0120.03917.65
7.0.00.0070.04317.68
5.6.400.0030.00915.93
5.6.390.0030.01516.10
5.6.380.0070.01116.06
5.6.370.0090.00616.31
5.6.360.0070.01315.79
5.6.350.0080.01615.82
5.6.340.0100.01016.19
5.6.330.0100.01015.78
5.6.320.0080.01216.12
5.6.310.0140.00716.13
5.6.300.0070.01115.97
5.6.290.0150.00416.13
5.6.280.0120.03718.69
5.6.270.0080.01216.11
5.6.260.0030.01016.16
5.6.250.0100.01016.07
5.6.240.0110.00416.16
5.6.230.0030.01316.07
5.6.220.0100.00715.91
5.6.210.0070.04318.38
5.6.200.0080.03217.00
5.6.190.0120.04218.31
5.6.180.0120.02718.29
5.6.170.0200.04518.12
5.6.160.0030.04418.08
5.6.150.0030.04917.11
5.6.140.0050.03217.05
5.6.130.0120.03916.99
5.6.120.0030.03018.59
5.6.110.0150.04118.43
5.6.100.0070.03618.65
5.6.90.0060.04118.46
5.6.80.0070.04318.16
5.6.70.0140.02318.25
5.6.60.0090.00916.13
5.6.50.0040.01216.04
5.6.40.0030.01316.01
5.6.30.0100.00715.77
5.6.20.0060.00916.05
5.6.10.0100.01015.73
5.6.00.0040.01615.75
5.5.380.0000.01915.94
5.5.370.0060.00916.12
5.5.360.0000.01816.00
5.5.350.0130.04718.23
5.5.340.0100.04316.89
5.5.330.0090.04118.13
5.5.320.0080.04618.07
5.5.310.0160.02818.08
5.5.300.0110.03816.98
5.5.290.0110.04817.04
5.5.280.0070.02918.38
5.5.270.0140.02318.47
5.5.260.0100.05018.54
5.5.250.0070.04818.23
5.5.240.0100.04518.01
5.5.230.0070.01715.82
5.5.220.0090.00915.94
5.5.210.0040.01915.92
5.5.200.0060.01115.79
5.5.190.0040.01015.80
5.5.180.0080.01316.05
5.5.170.0080.01216.02
5.5.160.0100.01315.90
5.5.150.0100.00715.98
5.5.140.0120.00616.02
5.5.130.0030.01715.70
5.5.120.0030.01015.63
5.5.110.0100.00715.62
5.5.100.0040.01615.80
5.5.90.0000.01815.69
5.5.80.0100.00715.76
5.5.70.0100.00715.71
5.5.60.0060.01315.93
5.5.50.0070.01015.95
5.5.40.0040.01115.88
5.5.30.0070.01115.68
5.5.20.0120.00816.01
5.5.10.0070.00715.84
5.5.00.0080.00815.83
5.4.450.1500.02415.89
5.4.440.2130.02016.02
5.4.430.1770.02316.15
5.4.420.1980.02516.10
5.4.410.1750.02316.07
5.4.400.1780.02215.69
5.4.390.1250.02015.91
5.4.380.1610.02215.81
5.4.370.1580.02515.75
5.4.360.1560.02315.64
5.4.350.1620.01815.77
5.4.340.1610.02015.95
5.4.330.0100.00512.65
5.4.320.1700.02315.90
5.4.310.1780.02115.91
5.4.300.0050.04415.78
5.4.290.0060.03915.72
5.4.280.1630.02315.77
5.4.270.1730.02615.82
5.4.260.1830.01815.81
5.4.250.1950.02715.74
5.4.240.1780.02615.79
5.4.230.2030.01815.70
5.4.220.2100.01815.89
5.4.210.2130.01715.93
5.4.200.2070.02215.85
5.4.190.2000.02715.90
5.4.180.2070.02515.77
5.4.170.1990.02215.72
5.4.160.1990.01915.78
5.4.150.2080.02315.78
5.4.140.2110.02214.45
5.4.130.2100.01514.39
5.4.120.2030.02114.44
5.4.110.2080.02214.41
5.4.100.2110.02014.31
5.4.90.2040.01514.38
5.4.80.1730.02214.39
5.4.70.1580.02314.31
5.4.60.1600.02214.44
5.4.50.1640.01814.46
5.4.40.1620.02614.33
5.4.30.1860.01714.46
5.4.20.1740.02114.52
5.4.10.2150.02014.42
5.4.00.2080.02314.18
5.3.290.1770.02914.01
5.3.280.2130.02013.88
5.3.270.2020.02313.87
5.3.260.2020.02413.80
5.3.250.2090.01813.97
5.3.240.2050.02313.76
5.3.230.2040.01913.73
5.3.220.2020.01813.83
5.3.210.2000.02413.79
5.3.200.1820.02213.87
5.3.190.1930.02313.85
5.3.180.1870.02213.93
5.3.170.2090.02413.98
5.3.160.1680.01813.81
5.3.150.1820.02013.85
5.3.140.1650.02313.87
5.3.130.1790.02013.86
5.3.120.1770.02513.69
5.3.110.1850.02313.82
5.3.100.1930.02213.55
5.3.90.2010.02413.58
5.3.80.2020.01913.51
5.3.70.2070.02113.50
5.3.60.2020.01813.54
5.3.50.2030.02313.49
5.3.40.2520.02513.49
5.3.30.1680.02613.38
5.3.20.1830.02013.34
5.3.10.1680.02013.27
5.3.00.1650.02713.32
5.2.170.3470.03011.00
5.2.160.3330.03011.21
5.2.150.3100.03711.06
5.2.140.3130.02711.05
5.2.130.2830.02710.99
5.2.120.2770.03011.22
5.2.110.2630.03011.03
5.2.100.2530.03311.06
5.2.90.2600.02710.96
5.2.80.2630.02310.97
5.2.70.2470.03010.98
5.2.60.3530.03010.91
5.2.50.3170.03010.88
5.2.40.2400.02711.11
5.2.30.2300.03011.00
5.2.20.2500.03010.98
5.2.10.2730.02710.82
5.2.00.2270.03310.59
5.1.60.2300.0239.99
5.1.50.2330.02710.10
5.1.40.2400.0239.97
5.1.30.2030.03010.28
5.1.20.2330.03010.30
5.1.10.2200.02310.14
5.1.00.2500.02710.19
5.0.50.1570.0108.78
5.0.40.1370.0178.78
5.0.30.1130.0338.78
5.0.20.1530.0208.78
5.0.10.1300.0208.78
5.0.00.1370.0378.78
4.4.90.1330.0208.78
4.4.80.1300.0208.78
4.4.70.1130.0178.78
4.4.60.1330.0138.78
4.4.50.1670.0178.78
4.4.40.1500.0308.78
4.4.30.1300.0208.78
4.4.20.1370.0208.78
4.4.10.1300.0138.78
4.4.00.1270.0278.78
4.3.110.1300.0178.78
4.3.100.1100.0178.78
4.3.90.1470.0208.78
4.3.80.1000.0278.78
4.3.70.1400.0178.78
4.3.60.1230.0178.78
4.3.50.1470.0208.78
4.3.40.1400.0278.78
4.3.30.0770.0208.78
4.3.20.0730.0178.78
4.3.10.0830.0278.78
4.3.00.0870.0238.78

preferences:
40.19 ms | 400 KiB | 5 Q