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; }

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.70.0070.01118.34
8.3.60.0140.00718.56
8.3.50.0060.01522.17
8.3.40.0040.01218.92
8.3.30.0080.00819.18
8.3.20.0080.00020.24
8.3.10.0040.00422.10
8.3.00.0050.00322.46
8.2.190.0040.01116.58
8.2.180.0140.00716.75
8.2.170.0060.01022.96
8.2.160.0070.00720.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.01526.16
8.2.120.0050.00519.73
8.2.110.0040.00722.43
8.2.100.0120.00019.82
8.2.90.0040.00419.20
8.2.80.0040.00417.97
8.2.70.0070.00317.61
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0030.00618.16
8.2.30.0040.00418.13
8.2.20.0030.00517.81
8.2.10.0030.00619.56
8.2.00.0000.00817.91
8.1.280.0120.00625.92
8.1.270.0000.00822.05
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00023.88
8.1.230.0100.00019.16
8.1.220.0040.00417.76
8.1.210.0000.00818.77
8.1.200.0040.00417.48
8.1.190.0050.00317.43
8.1.180.0000.00818.10
8.1.170.0040.00418.84
8.1.160.0040.00422.11
8.1.150.0000.00818.81
8.1.140.0040.00417.63
8.1.130.0000.00717.89
8.1.120.0000.00717.68
8.1.110.0040.00417.64
8.1.100.0000.00717.65
8.1.90.0000.00717.49
8.1.80.0000.00817.51
8.1.70.0070.00017.64
8.1.60.0030.00517.74
8.1.50.0040.00417.78
8.1.40.0040.00417.77
8.1.30.0040.00417.86
8.1.20.0040.00417.90
8.1.10.0040.00417.69
8.1.00.0000.00717.73
8.0.300.0040.00418.77
8.0.290.0000.00717.18
8.0.280.0000.00718.55
8.0.270.0030.00317.37
8.0.260.0000.00817.05
8.0.250.0030.00317.09
8.0.240.0040.00417.15
8.0.230.0040.00417.07
8.0.220.0040.00417.03
8.0.210.0030.00317.03
8.0.200.0100.00017.17
8.0.190.0000.00817.21
8.0.180.0040.00417.17
8.0.170.0000.00817.07
8.0.160.0000.00717.07
8.0.150.0000.00717.09
8.0.140.0030.00517.04
8.0.130.0060.00013.52
8.0.120.0040.00416.99
8.0.110.0040.00417.12
8.0.100.0000.00716.94
8.0.90.0070.00016.93
8.0.80.0060.00917.11
8.0.70.0040.00417.06
8.0.60.0020.00517.15
8.0.50.0030.00517.14
8.0.30.0110.00817.24
8.0.20.0070.01117.40
8.0.10.0000.00717.19
8.0.00.0080.01117.00
7.4.330.0050.00015.16
7.4.320.0030.00316.88
7.4.300.0080.00016.84
7.4.290.0070.00016.88
7.4.280.0070.00016.84
7.4.270.0000.00716.79
7.4.260.0000.00716.79
7.4.250.0030.00616.71
7.4.240.0030.00416.75
7.4.230.0000.00716.83
7.4.220.0070.01116.71
7.4.210.0060.01216.82
7.4.200.0040.00416.74
7.4.190.0000.00716.70
7.4.160.0060.01016.61
7.4.150.0150.00617.40
7.4.140.0110.01117.86
7.4.130.0090.01516.76
7.4.120.0050.01216.82
7.4.110.0070.01416.76
7.4.100.0110.00716.71
7.4.90.0150.00916.82
7.4.80.0110.01119.39
7.4.70.0090.00616.74
7.4.60.0130.00316.74
7.4.50.0030.00316.68
7.4.40.0100.00722.77
7.4.30.0080.00816.75
7.4.00.0100.00715.07
7.3.330.0040.00413.25
7.3.320.0000.00513.42
7.3.310.0000.00716.58
7.3.300.0000.00716.42
7.3.290.0110.00316.54
7.3.280.0110.00716.53
7.3.270.0070.01117.40
7.3.260.0100.00616.75
7.3.250.0080.01216.59
7.3.240.0100.01016.79
7.3.230.0100.00716.55
7.3.210.0050.01416.89
7.3.200.0100.01316.97
7.3.190.0060.01016.73
7.3.180.0130.00316.42
7.3.170.0120.00916.70
7.3.160.0080.00816.88
7.3.120.0090.00615.31
7.2.330.0130.01016.90
7.2.320.0130.01016.88
7.2.310.0140.00516.87
7.2.300.0130.00416.89
7.2.290.0050.01116.77
7.2.80.0000.01116.91
7.2.60.0060.00917.25
7.2.00.0050.00819.77
7.1.200.0070.00715.71
7.1.100.0060.00918.67
7.1.70.0100.00017.43
7.1.60.0130.01319.82
7.1.50.0130.01317.19
7.1.00.0070.07322.50
7.0.200.0070.00016.90
7.0.140.0070.06722.08
7.0.100.0100.08319.99
7.0.90.0070.07719.95
7.0.80.0270.07020.03
7.0.70.0230.05719.98
7.0.60.0070.08320.12
7.0.50.0300.07020.33
7.0.40.0000.05720.05
7.0.30.0130.07320.12
7.0.20.0130.08320.11
7.0.10.0100.07320.14
7.0.00.0030.07320.04
5.6.250.0070.08020.63
5.6.240.0070.08320.76
5.6.230.0000.07720.75
5.6.220.0030.08320.52
5.6.210.0100.06020.57
5.6.200.0070.08721.07
5.6.190.0070.09321.09
5.6.180.0130.05021.08
5.6.170.0100.07320.97
5.6.160.0070.05320.96
5.6.150.0070.06721.02
5.6.140.0100.05721.11
5.6.130.0100.07720.95
5.6.120.0130.07021.11
5.6.110.0130.07721.07
5.6.100.0170.06320.93
5.6.90.0100.06721.09
5.6.80.0130.05020.36
5.6.70.0070.05320.41
5.6.60.0070.04720.39
5.6.50.0030.08320.44
5.6.40.0170.06320.31
5.6.30.0130.05020.50
5.6.20.0070.07720.41
5.6.10.0030.04320.39
5.6.00.0100.07020.36
5.5.380.0170.04020.37
5.5.370.0070.06720.36
5.5.360.0170.07320.35
5.5.350.0130.06320.35
5.5.340.0100.06720.82
5.5.330.0100.05720.93
5.5.320.0070.08020.75
5.5.310.0070.08320.91
5.5.300.0070.08720.92
5.5.290.0230.06320.95
5.5.280.0170.07020.91
5.5.270.0000.05320.84
5.5.260.0100.03720.86
5.5.250.0100.06720.58
5.5.240.0100.05720.25
5.5.230.0070.04320.27
5.5.220.0000.05020.25
5.5.210.0000.06720.23
5.5.200.0130.07320.24
5.5.190.0030.06720.12
5.5.180.0070.07720.09
5.5.160.0030.05020.27
5.5.150.0070.06720.29
5.5.140.0070.06720.23
5.5.130.0000.04320.26
5.5.120.0070.07320.15
5.5.110.0030.04320.19
5.5.100.0100.08020.09
5.5.90.0200.05320.08
5.5.80.0030.05020.10
5.5.70.0030.04720.07
5.5.60.0100.03720.10
5.5.50.0100.04320.14
5.5.40.0100.06720.06
5.5.30.0130.08019.94
5.5.20.0100.07720.06
5.5.10.0070.08320.09
5.5.00.0130.07320.05
5.4.450.0100.06319.38
5.4.440.0070.05019.11
5.4.430.0030.07719.44
5.4.420.0100.04019.44
5.4.410.0030.05719.34
5.4.400.0070.06319.03
5.4.390.0030.08318.79
5.4.380.0070.07318.94
5.4.370.0130.03319.05
5.4.360.0100.06018.95
5.4.350.0100.07318.95
5.4.340.0070.06718.96
5.4.320.0130.03318.98
5.4.310.0100.06019.03
5.4.300.0000.06719.14
5.4.290.0100.07319.09
5.4.280.0030.06319.14
5.4.270.0100.06719.14
5.4.260.0070.04319.02
5.4.250.0000.08318.91
5.4.240.0100.07018.90
5.4.230.0070.07719.04
5.4.220.0100.06718.80
5.4.210.0030.07718.99
5.4.200.0030.06719.05
5.4.190.0000.08019.08
5.4.180.0030.03719.06
5.4.170.0100.06318.97
5.4.160.0070.03319.00
5.4.150.0070.07719.12
5.4.140.0070.03716.37
5.4.130.0070.04716.38
5.4.120.0100.06016.38
5.4.110.0130.06316.35
5.4.100.0030.04316.44
5.4.90.0100.07316.36
5.4.80.0030.06316.34
5.4.70.0030.07716.22
5.4.60.0100.06716.20
5.4.50.0070.05016.23
5.4.40.0100.07016.43
5.4.30.0230.05716.18
5.4.20.0070.06016.40
5.4.10.0100.08016.34
5.4.00.0070.06015.78
5.3.290.0230.06314.64
5.3.280.0030.04314.45
5.3.270.0130.07014.48
5.3.260.0100.06014.48
5.3.250.0100.07714.54
5.3.240.0030.07714.44
5.3.230.0070.07314.59
5.3.220.0030.04714.50
5.3.210.0030.06314.53
5.3.200.0100.07714.59
5.3.190.0070.06014.59
5.3.180.0030.06714.54
5.3.170.0070.04314.52
5.3.160.0130.03714.49
5.3.150.0030.08014.44
5.3.140.0100.06714.43
5.3.130.0070.08014.42
5.3.120.0030.07014.50
5.3.110.0070.07714.43
5.3.100.0070.07014.01
5.3.90.0070.06714.02
5.3.80.0030.07714.02
5.3.70.0000.08014.03
5.3.60.0170.06013.78
5.3.50.0070.04313.73
5.3.40.0130.05313.72
5.3.30.0070.06313.83
5.3.20.0070.06013.73
5.3.10.0130.03013.46
5.3.00.0130.04313.51
5.2.170.0000.07312.09
5.2.160.0070.06312.09
5.2.150.0070.05712.09
5.2.140.0030.03012.09
5.2.130.0030.06712.09
5.2.120.0070.05012.09
5.2.110.0030.06312.09
5.2.100.0100.06012.09
5.2.90.0030.04312.09
5.2.80.0000.04012.09
5.2.70.0030.06312.09
5.2.60.0030.05012.09
5.2.50.0030.03712.09
5.2.40.0130.06312.09
5.2.30.0000.03712.09
5.2.20.0130.05312.09
5.2.10.0000.05712.09
5.2.00.0000.06312.09
5.1.60.0030.04012.09
5.1.50.0070.03012.09
5.1.40.0000.05312.09
5.1.30.0000.06312.09
5.1.20.0130.05312.09
5.1.10.0000.05712.09
5.1.00.0000.06012.09
5.0.50.0030.02312.09
5.0.40.0070.03712.09
5.0.30.0030.06312.09
5.0.20.0000.04712.09
5.0.10.0030.02312.09
5.0.00.0030.06012.09
4.4.90.0030.03312.09
4.4.80.0130.03712.09
4.4.70.0000.02012.09
4.4.60.0070.03312.09
4.4.50.0030.02712.09
4.4.40.0030.02712.09
4.4.30.0030.03012.09
4.4.20.0030.03012.09
4.4.10.0000.03712.09
4.4.00.0030.05312.09
4.3.110.0000.01712.09
4.3.100.0100.03012.09
4.3.90.0100.02312.09
4.3.80.0030.02712.09
4.3.70.0030.03312.09
4.3.60.0000.02712.09
4.3.50.0030.02712.09
4.3.40.0000.03312.09
4.3.30.0000.02012.09
4.3.20.0030.02012.09
4.3.10.0000.03712.09
4.3.00.0000.02012.09

preferences:
51.85 ms | 401 KiB | 5 Q