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 = mb_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); echo 'part' . $c . '=' . $part; 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.0070.01418.56
8.3.50.0150.00322.17
8.3.40.0040.01119.09
8.3.30.0120.00618.83
8.3.20.0040.00418.85
8.3.10.0090.00021.09
8.3.00.0030.00523.65
8.2.180.0070.01416.75
8.2.170.0040.01122.96
8.2.160.0070.01020.55
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0080.00026.16
8.2.120.0080.00019.89
8.2.110.0060.00319.38
8.2.100.0090.00318.14
8.2.90.0060.00319.35
8.2.80.0040.00417.97
8.2.70.0040.00417.88
8.2.60.0090.00018.05
8.2.50.0030.00618.10
8.2.40.0050.00318.16
8.2.30.0050.00321.29
8.2.20.0000.00717.96
8.2.10.0030.00517.88
8.2.00.0000.00917.84
8.1.280.0100.01025.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0050.00528.09
8.1.240.0060.00319.52
8.1.230.0070.00417.82
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0070.00317.48
8.1.190.0030.00617.38
8.1.180.0040.00418.10
8.1.170.0040.00418.77
8.1.160.0000.00718.98
8.1.150.0000.00818.73
8.1.140.0000.00817.63
8.1.130.0000.00717.76
8.1.120.0000.00817.69
8.1.110.0040.00417.62
8.1.100.0000.00817.58
8.1.90.0000.00717.69
8.1.80.0080.00017.64
8.1.70.0000.00817.57
8.1.60.0090.00017.78
8.1.50.0040.00417.73
8.1.40.0000.00917.80
8.1.30.0000.00817.95
8.1.20.0040.00417.86
8.1.10.0000.00817.68
8.1.00.0040.00417.68
8.0.300.0000.00818.77
8.0.290.0040.00417.00
8.0.280.0040.00418.55
8.0.270.0000.00717.34
8.0.260.0040.00417.02
8.0.250.0030.00517.16
8.0.240.0080.00017.11
8.0.230.0000.00717.17
8.0.220.0070.00017.07
8.0.210.0030.00317.11
8.0.200.0000.00717.23
8.0.190.0000.00817.06
8.0.180.0040.00417.12
8.0.170.0030.00617.15
8.0.160.0000.00817.02
8.0.150.0040.00416.98
8.0.140.0000.00717.06
8.0.130.0030.00313.54
8.0.120.0080.00017.11
8.0.110.0040.00416.95
8.0.100.0020.00517.00
8.0.90.0040.00417.18
8.0.80.0140.00017.14
8.0.70.0000.00717.08
8.0.60.0040.00417.02
8.0.50.0070.00017.24
8.0.30.0150.00517.09
8.0.20.0150.00817.52
8.0.10.0000.00717.07
8.0.00.0080.01016.94
7.4.330.0000.00515.00
7.4.320.0030.00316.82
7.4.300.0030.00316.88
7.4.290.0080.00016.68
7.4.280.0030.00316.66
7.4.270.0000.00716.85
7.4.260.0030.00313.48
7.4.250.0000.00816.60
7.4.240.0000.00716.77
7.4.230.0040.00416.82
7.4.220.0120.00616.66
7.4.210.0090.00616.79
7.4.200.0030.00316.56
7.4.190.0000.00716.89
7.4.160.0130.00316.65
7.4.150.0070.01017.40
7.4.140.0080.01517.86
7.4.130.0110.00616.75
7.4.120.0100.00816.67
7.4.110.0140.00416.91
7.4.100.0130.00916.80
7.4.90.0060.01216.56
7.4.80.0130.01019.39
7.4.70.0190.00016.70
7.4.60.0070.01016.71
7.4.50.0060.00316.78
7.4.40.0040.01222.52
7.4.30.0060.01316.92
7.4.00.0080.00815.07
7.3.330.0030.00313.43
7.3.320.0030.00313.21
7.3.310.0030.00316.46
7.3.300.0070.00016.42
7.3.290.0090.00616.50
7.3.280.0070.00816.50
7.3.270.0070.01017.40
7.3.260.0100.00818.24
7.3.250.0130.00916.76
7.3.240.0080.00816.53
7.3.230.0140.00416.52
7.3.210.0090.00916.56
7.3.200.0030.01319.39
7.3.190.0130.01016.74
7.3.180.0140.00316.73
7.3.170.0060.01216.47
7.3.160.0170.00016.79
7.3.120.0070.00715.31
7.2.330.0060.01116.89
7.2.320.0090.00816.99
7.2.310.0140.00516.91
7.2.300.0090.01216.87
7.2.290.0040.01316.76
7.2.80.0210.00316.70
7.2.60.0110.00017.22
7.1.200.0060.00815.75
7.1.70.0040.00417.13
7.1.60.0100.01319.40
7.1.50.0100.01317.29
7.1.00.0100.05722.47
7.0.200.0080.00416.89
7.0.140.0070.07021.95
7.0.110.0030.05319.96
7.0.100.0100.04720.16
7.0.90.0100.07320.07
7.0.80.0000.08319.96
7.0.70.0200.07020.00
7.0.60.0030.08020.07
7.0.50.0100.07720.44
7.0.40.0130.04320.22
7.0.30.0230.06320.28
7.0.20.0030.07320.22
7.0.10.0070.08020.27
7.0.00.0070.08020.05
5.6.280.0030.07721.12
5.6.250.0030.08720.66
5.6.240.0000.06720.71
5.6.230.0030.09020.67
5.6.220.0000.08720.65
5.6.210.0070.08320.64
5.6.200.0030.08321.21
5.6.190.0070.07321.20
5.6.180.0130.07721.00
5.6.170.0130.07321.20
5.6.160.0000.09021.12
5.6.150.0000.08721.03
5.6.140.0070.04720.99
5.6.130.0230.07021.15
5.6.120.0100.04321.10
5.6.110.0130.08020.99
5.6.100.0070.08320.96
5.6.90.0100.08020.92
5.6.80.0130.07320.34
5.6.70.0100.07720.41
5.6.60.0130.06720.36
5.6.50.0070.07720.54
5.6.40.0200.07020.28
5.6.30.0100.07020.46
5.6.20.0130.07320.35
5.6.10.0100.08020.30
5.6.00.0070.07320.64
5.5.380.0100.07720.34
5.5.370.0100.07320.53
5.5.360.0070.08020.45
5.5.350.0130.06320.45
5.5.340.0100.07720.99
5.5.330.0100.07020.83
5.5.320.0030.08320.80
5.5.310.0100.08020.99
5.5.300.0100.07720.82
5.5.290.0030.09020.92
5.5.280.0070.08020.91
5.5.270.0070.07720.93
5.5.260.0070.08320.81
5.5.250.0130.07720.81
5.5.240.0070.05320.21
5.5.230.0200.06320.36
5.5.220.0170.06720.13
5.5.210.0100.04320.29
5.5.200.0170.06720.35
5.5.190.0070.08320.31
5.5.180.0070.08320.27
5.5.160.0100.05020.40
5.5.150.0100.06720.32
5.5.140.0070.07720.18
5.5.130.0070.04320.30
5.5.120.0130.07020.40
5.5.110.0030.05020.06
5.5.100.0070.05720.27
5.5.90.0070.06020.16
5.5.80.0130.05020.22
5.5.70.0100.05720.23
5.5.60.0030.07720.25
5.5.50.0030.07720.14
5.5.40.0170.06020.14
5.5.30.0030.08720.04
5.5.20.0070.08020.24
5.5.10.0070.04720.17
5.5.00.0000.05320.23
5.4.450.0030.08319.41
5.4.440.0170.07019.60
5.4.430.0130.06719.39
5.4.420.0070.04719.44
5.4.410.0070.07719.20
5.4.400.0070.07018.95
5.4.390.0070.07318.93
5.4.380.0030.07719.16
5.4.370.0030.08018.91
5.4.360.0070.05018.94
5.4.350.0070.08019.18
5.4.340.0030.06719.03
5.4.320.0070.07019.11
5.4.310.0200.05019.18
5.4.300.0070.06718.98
5.4.290.0130.03319.09
5.4.280.0000.08319.04
5.4.270.0000.08319.02
5.4.260.0070.07719.12
5.4.250.0030.08018.94
5.4.240.0170.05719.15
5.4.230.0000.07019.11
5.4.220.0000.07019.26
5.4.210.0130.07319.17
5.4.200.0070.06719.11
5.4.190.0070.07318.93
5.4.180.0030.07019.11
5.4.170.0030.08019.00
5.4.160.0130.06718.93
5.4.150.0130.07318.95
5.4.140.0130.06716.47
5.4.130.0130.06716.25
5.4.120.0030.07016.23
5.4.110.0170.06016.40
5.4.100.0070.07016.24
5.4.90.0100.06316.15
5.4.80.0030.03716.27
5.4.70.0000.05316.51
5.4.60.0030.07316.28
5.4.50.0030.07316.28
5.4.40.0170.06016.40
5.4.30.0130.06716.50
5.4.20.0070.07716.36
5.4.10.0100.07316.45
5.4.00.0070.07015.97
5.3.290.0070.07714.61
5.3.280.0000.05714.40
5.3.270.0030.06014.70
5.3.260.0100.07014.56
5.3.250.0070.07714.55
5.3.240.0100.07014.48
5.3.230.0100.05714.64
5.3.220.0100.07314.52
5.3.210.0070.07714.59
5.3.200.0100.07014.68
5.3.190.0030.08014.53
5.3.180.0100.06714.37
5.3.170.0030.04714.45
5.3.160.0000.08014.48
5.3.150.0070.07014.59
5.3.140.0130.06714.52
5.3.130.0100.07314.63
5.3.120.0000.08314.56
5.3.110.0130.06714.50
5.3.100.0070.07313.93
5.3.90.0100.07013.96
5.3.80.0100.06713.86
5.3.70.0070.07713.89
5.3.60.0030.07313.86
5.3.50.0070.07013.89
5.3.40.0100.07313.84
5.3.30.0030.04313.71
5.3.20.0100.03313.63
5.3.10.0070.06713.52
5.3.00.0130.07013.75
5.2.170.0030.03711.11
5.2.160.0070.05711.09
5.2.150.0070.06011.09
5.2.140.0100.05711.05
5.2.130.0100.05711.14
5.2.120.0030.06311.07
5.2.110.0000.03711.08
5.2.100.0030.06711.14
5.2.90.0030.03711.06
5.2.80.0070.05711.02
5.2.70.0070.06011.06
5.2.60.0030.05711.14
5.2.50.0100.05710.96
5.2.40.0070.06011.04
5.2.30.0100.05311.16
5.2.20.0000.05010.91
5.2.10.0100.05310.83
5.2.00.0030.05710.88
5.1.60.0100.05010.27
5.1.50.0000.05710.27
5.1.40.0030.05710.27
5.1.30.0000.06010.44
5.1.20.0130.05010.34
5.1.10.0100.02710.27
5.1.00.0030.05710.27
5.0.50.0030.04710.27
5.0.40.0030.04710.27
5.0.30.0000.07010.27
5.0.20.0100.03710.27
5.0.10.0100.03710.27
5.0.00.0030.06310.27
4.4.90.0000.04010.27
4.4.80.0070.03310.27
4.4.70.0000.03710.27
4.4.60.0030.03310.27
4.4.50.0070.03310.27
4.4.40.0000.06010.27
4.4.30.0000.04010.27
4.4.20.0130.02710.27
4.4.10.0070.03010.27
4.4.00.0030.05010.27
4.3.110.0000.03710.27
4.3.100.0070.03010.27
4.3.90.0070.02710.27
4.3.80.0000.05310.27
4.3.70.0030.03310.27
4.3.60.0030.03010.27
4.3.50.0070.03010.27
4.3.40.0000.04010.27
4.3.30.0070.01710.27
4.3.20.0070.02710.27
4.3.10.0030.02010.27
4.3.00.0030.03010.27

preferences:
53.79 ms | 401 KiB | 5 Q