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 . ')\n'; 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.0100.01018.43
8.3.50.0080.01022.24
8.3.40.0110.01118.92
8.3.30.0070.01419.17
8.3.20.0090.00020.34
8.3.10.0050.00322.09
8.3.00.0040.00422.39
8.2.180.0130.00616.75
8.2.170.0070.00722.96
8.2.160.0090.00620.93
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00419.49
8.2.110.0090.00022.21
8.2.100.0080.00317.91
8.2.90.0000.00819.17
8.2.80.0040.00418.04
8.2.70.0060.00317.75
8.2.60.0000.00918.05
8.2.50.0040.00418.07
8.2.40.0050.00318.34
8.2.30.0070.00018.32
8.2.20.0050.00317.95
8.2.10.0040.00417.81
8.2.00.0050.00318.04
8.1.280.0070.00725.92
8.1.270.0050.00323.91
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0040.00423.90
8.1.230.0110.00019.16
8.1.220.0030.00517.75
8.1.210.0050.00318.77
8.1.200.0030.00617.48
8.1.190.0050.00317.53
8.1.180.0000.00918.10
8.1.170.0030.00618.71
8.1.160.0040.00421.98
8.1.150.0030.00618.84
8.1.140.0040.00417.53
8.1.130.0050.00317.92
8.1.120.0040.00417.69
8.1.110.0000.00817.62
8.1.100.0060.00317.67
8.1.90.0030.00617.60
8.1.80.0040.00417.67
8.1.70.0030.00517.59
8.1.60.0080.00017.81
8.1.50.0040.00417.78
8.1.40.0060.00317.64
8.1.30.0080.00017.95
8.1.20.0000.00817.94
8.1.10.0000.00917.80
8.1.00.0040.00417.81
8.0.300.0040.00418.77
8.0.290.0080.00017.30
8.0.280.0040.00418.55
8.0.270.0000.00717.31
8.0.260.0030.00516.90
8.0.250.0070.00017.19
8.0.240.0050.00217.13
8.0.230.0000.00717.16
8.0.220.0030.00316.96
8.0.210.0000.00717.09
8.0.200.0070.00017.18
8.0.190.0050.00317.17
8.0.180.0070.00317.20
8.0.170.0000.00817.19
8.0.160.0040.00417.12
8.0.150.0000.00717.14
8.0.140.0020.00517.04
8.0.130.0030.00313.54
8.0.120.0030.00517.00
8.0.110.0030.00517.10
8.0.100.0040.00417.14
8.0.90.0030.00617.13
8.0.80.0130.00517.12
8.0.70.0000.00817.09
8.0.60.0000.00717.24
8.0.50.0000.00717.13
8.0.30.0080.01017.06
8.0.20.0080.01317.51
8.0.10.0030.00517.18
8.0.00.0110.00717.04
7.4.330.0050.00015.00
7.4.320.0080.00016.82
7.4.300.0030.00316.73
7.4.290.0000.00816.66
7.4.280.0030.00316.68
7.4.270.0000.00716.67
7.4.260.0060.00316.87
7.4.250.0000.00716.68
7.4.240.0020.00516.75
7.4.230.0020.00516.82
7.4.220.0100.01016.79
7.4.210.0120.00516.85
7.4.200.0000.00716.82
7.4.190.0030.00317.02
7.4.160.0100.00716.49
7.4.150.0140.01517.40
7.4.140.0070.01117.86
7.4.130.0100.00816.84
7.4.120.0130.00516.81
7.4.110.0140.00416.76
7.4.100.0070.01016.83
7.4.90.0120.00616.91
7.4.80.0120.00619.39
7.4.70.0110.00716.80
7.4.60.0090.01316.64
7.4.50.0000.00716.82
7.4.40.0120.00322.77
7.4.30.0100.00716.64
7.4.00.0090.00615.00
7.3.330.0030.00313.25
7.3.320.0050.00013.25
7.3.310.0000.00716.44
7.3.300.0030.00316.50
7.3.290.0070.00716.46
7.3.280.0100.01016.51
7.3.270.0100.01617.40
7.3.260.0080.00916.54
7.3.250.0090.00916.54
7.3.240.0090.01316.53
7.3.230.0200.00316.59
7.3.210.0140.00716.49
7.3.200.0190.00419.39
7.3.190.0120.00616.81
7.3.180.0000.01516.65
7.3.170.0130.00316.54
7.3.160.0090.00616.63
7.3.120.0000.01215.37
7.2.330.0090.00916.89
7.2.320.0060.01216.90
7.2.310.0130.00616.94
7.2.300.0110.01116.94
7.2.290.0090.00816.80
7.1.200.0030.00615.91
7.1.70.0060.01217.20
7.1.60.0030.02219.82
7.1.50.0030.01217.13
7.1.00.0030.07722.46
7.0.200.0130.01016.66
7.0.140.0000.07722.08
7.0.100.0070.04019.96
7.0.90.0070.08019.92
7.0.80.0070.03719.97
7.0.70.0270.06719.96
7.0.60.0070.07019.99
7.0.50.0470.07020.19
7.0.40.0070.08720.12
7.0.30.0030.09020.13
7.0.20.0030.06320.04
7.0.10.0070.05319.93
7.0.00.0170.08020.03
5.6.280.0070.07021.12
5.6.250.0030.06720.73
5.6.240.0100.07720.68
5.6.230.0170.06320.61
5.6.220.0030.04020.56
5.6.210.0130.07020.73
5.6.200.0070.08321.09
5.6.190.0170.07721.02
5.6.180.0130.07721.04
5.6.170.0070.08721.18
5.6.160.0030.04321.04
5.6.150.0070.08021.12
5.6.140.0130.08021.01
5.6.130.0170.07720.95
5.6.120.0070.08021.01
5.6.110.0130.07320.95
5.6.100.0100.08721.00
5.6.90.0100.07321.02
5.6.80.0130.06020.37
5.6.70.0070.08020.42
5.6.60.0030.08320.55
5.6.50.0030.04720.33
5.6.40.0100.04320.38
5.6.30.0100.04720.39
5.6.20.0070.08020.24
5.6.10.0070.05720.36
5.6.00.0130.04020.45
5.5.380.0170.08020.46
5.5.370.0030.07320.36
5.5.360.0000.09020.35
5.5.350.0030.08720.41
5.5.340.0100.08020.63
5.5.330.0030.08720.89
5.5.320.0030.06720.86
5.5.310.0100.07720.77
5.5.300.0100.08020.82
5.5.290.0170.07320.81
5.5.280.0100.08320.83
5.5.270.0170.07020.91
5.5.260.0100.08020.92
5.5.250.0200.07020.69
5.5.240.0100.07320.27
5.5.230.0100.09020.28
5.5.220.0130.07720.16
5.5.210.0000.06320.30
5.5.200.0100.06320.19
5.5.190.0130.07720.11
5.5.180.0170.06020.11
5.5.160.0070.06320.22
5.5.150.0030.06020.14
5.5.140.0130.08020.12
5.5.130.0100.07720.15
5.5.120.0070.06020.24
5.5.110.0100.08020.27
5.5.100.0070.04720.06
5.5.90.0070.07720.01
5.5.80.0200.03020.17
5.5.70.0100.04720.04
5.5.60.0070.08320.14
5.5.50.0000.09020.03
5.5.40.0030.07020.00
5.5.30.0070.07320.15
5.5.20.0030.06720.03
5.5.10.0100.07720.07
5.5.00.0100.08320.02
5.4.450.0100.09019.29
5.4.440.0030.05719.37
5.4.430.0000.08319.26
5.4.420.0030.08319.42
5.4.410.0170.06719.01
5.4.400.0000.08019.12
5.4.390.0070.06718.96
5.4.380.0100.07318.79
5.4.370.0000.05719.03
5.4.360.0000.08319.10
5.4.350.0130.07319.23
5.4.340.0070.04319.07
5.4.320.0030.04719.12
5.4.310.0100.04719.23
5.4.300.0100.07319.14
5.4.290.0070.06319.00
5.4.280.0000.06019.14
5.4.270.0100.03719.05
5.4.260.0030.07719.03
5.4.250.0100.07319.02
5.4.240.0100.07318.96
5.4.230.0100.07319.13
5.4.220.0100.07019.11
5.4.210.0100.05718.80
5.4.200.0030.08319.13
5.4.190.0100.06019.22
5.4.180.0030.07719.01
5.4.170.0130.06318.98
5.4.160.0070.04319.12
5.4.150.0070.06019.09
5.4.140.0000.06316.29
5.4.130.0100.05716.31
5.4.120.0070.07316.37
5.4.110.0130.05716.23
5.4.100.0070.07316.37
5.4.90.0170.03016.22
5.4.80.0030.07716.20
5.4.70.0030.07016.21
5.4.60.0000.07316.25
5.4.50.0030.07316.42
5.4.40.0070.07716.29
5.4.30.0030.07316.33
5.4.20.0200.06316.41
5.4.10.0000.05016.39
5.4.00.0170.03015.50
5.3.290.0070.08014.68
5.3.280.0030.07714.45
5.3.270.0030.06014.61
5.3.260.0070.08314.54
5.3.250.0100.07014.60
5.3.240.0070.07714.44
5.3.230.0030.08014.59
5.3.220.0030.08014.40
5.3.210.0070.07314.57
5.3.200.0070.07314.59
5.3.190.0130.07014.42
5.3.180.0070.07314.57
5.3.170.0100.07314.59
5.3.160.0000.05314.57
5.3.150.0070.08014.52
5.3.140.0000.08314.48
5.3.130.0100.05014.56
5.3.120.0070.07314.53
5.3.110.0100.07014.57
5.3.100.0100.07014.02
5.3.90.0130.06313.89
5.3.80.0070.07713.89
5.3.70.0030.07713.98
5.3.60.0070.07713.88
5.3.50.0100.07313.90
5.3.40.0070.06313.96
5.3.30.0100.05713.70
5.3.20.0070.07313.57
5.3.10.0100.04713.53
5.3.00.0100.06713.64
5.2.170.0030.06311.13
5.2.160.0100.03311.00
5.2.150.0070.06310.98
5.2.140.0030.06311.19
5.2.130.0030.05711.12
5.2.120.0130.05711.12
5.2.110.0170.05010.98
5.2.100.0070.05011.17
5.2.90.0100.05311.12
5.2.80.0000.06311.15
5.2.70.0030.06311.10
5.2.60.0100.05711.11
5.2.50.0000.03310.85
5.2.40.0030.03311.07
5.2.30.0070.04711.00
5.2.20.0070.06010.82
5.2.10.0030.03310.75
5.2.00.0070.05710.67
5.1.60.0000.0579.85
5.1.50.0130.0479.85
5.1.40.0030.0409.82
5.1.30.0030.05710.28
5.1.20.0070.06010.28
5.1.10.0130.0409.97
5.1.00.0170.0409.93
5.0.50.0030.0378.66
5.0.40.0030.0438.32
5.0.30.0000.0708.32
5.0.20.0000.0278.33
5.0.10.0070.0408.32
5.0.00.0030.0638.32
4.4.90.0000.0408.32
4.4.80.0100.0278.32
4.4.70.0000.0308.32
4.4.60.0030.0278.32
4.4.50.0030.0278.32
4.4.40.0030.0278.32
4.4.30.0000.0208.32
4.4.20.0000.0208.32
4.4.10.0030.0308.32
4.4.00.0000.0278.32
4.3.110.0070.0338.32
4.3.100.0000.0378.32
4.3.90.0000.0338.32
4.3.80.0070.0408.32
4.3.70.0000.0338.32
4.3.60.0030.0308.32
4.3.50.0030.0278.32
4.3.40.0030.0478.32
4.3.30.0000.0208.32
4.3.20.0030.0308.32
4.3.10.0030.0238.32
4.3.00.0070.0308.32

preferences:
57.57 ms | 401 KiB | 5 Q