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]-5; } else { $p2 = 0; } //$p1 = (strpos($part,' ')=== false)?0:mb_strpos($part,' ')+1; //$p2 = (strrpos($part,' ')=== false)?0:mb_strrpos($part,' '); echo 'p1='.$p1; echo ' p2 =' . $p2; $snippet .= '[' . substr($part, $p1, $p2) . ']'; if ($to<strlen($description)-1) $snippet .= '...'; } } if(strlen($snippet)< $conf['search_description'] && !empty($p2) && $p2<$conf['search_description'] ) $snippet = $snippet . substr($description,$p2+10,strlen($description)-1); 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.0000.01517.00
8.3.50.0100.00617.68
8.3.40.0110.00418.92
8.3.30.0090.00918.78
8.3.20.0040.00418.94
8.3.10.0040.00420.83
8.3.00.0090.00619.51
8.2.180.0090.00618.43
8.2.170.0070.01119.11
8.2.160.0140.00022.96
8.2.150.0030.00524.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00417.88
8.2.110.0090.00021.25
8.2.100.0040.00818.03
8.2.90.0030.00619.09
8.2.80.0040.00418.05
8.2.70.0050.00317.75
8.2.60.0050.00317.80
8.2.50.0000.00818.07
8.2.40.0000.00718.28
8.2.30.0040.00418.31
8.2.20.0020.00517.78
8.2.10.0060.00317.91
8.2.00.0070.00017.93
8.1.280.0140.00725.92
8.1.270.0090.00022.31
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00620.70
8.1.230.0040.00820.88
8.1.220.0040.00417.74
8.1.210.0060.00319.03
8.1.200.0030.00617.61
8.1.190.0080.00017.53
8.1.180.0050.00318.10
8.1.170.0050.00318.89
8.1.160.0040.00418.90
8.1.150.0050.00318.74
8.1.140.0080.00017.54
8.1.130.0030.00317.79
8.1.120.0070.00017.73
8.1.110.0070.00017.68
8.1.100.0000.00717.67
8.1.90.0040.00417.66
8.1.80.0000.00717.54
8.1.70.0000.00717.51
8.1.60.0090.00017.81
8.1.50.0090.00017.66
8.1.40.0000.00817.82
8.1.30.0040.00417.77
8.1.20.0040.00417.88
8.1.10.0030.00517.84
8.1.00.0070.00317.61
8.0.300.0000.00720.29
8.0.290.0050.00217.00
8.0.280.0050.00318.46
8.0.270.0030.00317.37
8.0.260.0000.00817.02
8.0.250.0050.00317.24
8.0.240.0030.00617.22
8.0.230.0000.00717.19
8.0.220.0070.00017.17
8.0.210.0040.00417.11
8.0.200.0000.00717.16
8.0.190.0030.00517.14
8.0.180.0060.00317.18
8.0.170.0040.00717.11
8.0.160.0080.00017.21
8.0.150.0050.00216.96
8.0.140.0080.00417.07
8.0.130.0000.00613.52
8.0.120.0000.00717.09
8.0.110.0070.00017.09
8.0.100.0050.00216.95
8.0.90.0040.00417.24
8.0.80.0070.00717.11
8.0.70.0040.00417.14
8.0.60.0000.00716.92
8.0.50.0080.00017.11
8.0.30.0070.01417.13
8.0.20.0130.00517.36
8.0.10.0000.00717.18
8.0.00.0110.00717.14
7.4.330.0050.00013.22
7.4.320.0040.00416.84
7.4.300.0040.00416.83
7.4.290.0030.00316.86
7.4.280.0080.00016.74
7.4.270.0080.00016.64
7.4.260.0050.00013.58
7.4.250.0060.00316.84
7.4.240.0040.00416.67
7.4.230.0040.00416.63
7.4.220.0130.01316.81
7.4.210.0090.00716.84
7.4.200.0030.00416.95
7.4.190.0050.00316.97
7.4.160.0080.00816.66
7.4.150.0120.00616.92
7.4.140.0070.01116.86
7.4.130.0080.01116.82
7.4.120.0100.01416.78
7.4.110.0150.00316.68
7.4.100.0110.00716.70
7.4.90.0090.00916.89
7.4.80.0120.00416.75
7.4.70.0150.00316.89
7.4.60.0070.01116.49
7.4.50.0040.00416.61
7.4.40.0140.00316.68
7.4.30.0100.01416.73
7.4.10.0110.00815.07
7.4.00.0100.00615.15
7.3.330.0030.00313.27
7.3.320.0000.00713.34
7.3.310.0000.00716.46
7.3.300.0030.00316.49
7.3.290.0180.00616.46
7.3.280.0060.01216.54
7.3.270.0030.01316.78
7.3.260.0100.00816.54
7.3.250.0090.01216.48
7.3.240.0040.01316.60
7.3.230.0150.00916.41
7.3.210.0100.00716.47
7.3.200.0140.00819.39
7.3.190.0100.01316.58
7.3.180.0060.01016.75
7.3.170.0090.00916.68
7.3.160.0090.00616.77
7.3.130.0000.01915.22
7.3.120.0080.00715.12
7.3.110.0100.01014.95
7.3.100.0030.01014.78
7.3.90.0030.01314.85
7.3.80.0140.00715.12
7.3.70.0030.00715.13
7.3.60.0000.01814.92
7.3.50.0040.01414.66
7.3.40.0090.00015.11
7.3.30.0090.00615.16
7.3.20.0120.00416.84
7.3.10.0090.00616.61
7.3.00.0080.00616.87
7.2.330.0100.00716.89
7.2.320.0150.00916.79
7.2.310.0170.00316.87
7.2.300.0120.00616.93
7.2.290.0100.00716.91
7.2.260.0040.01515.17
7.2.250.0120.00614.98
7.2.240.0000.01415.45
7.2.230.0100.01015.18
7.2.220.0100.01315.39
7.2.210.0030.01615.33
7.2.200.0030.01415.36
7.2.190.0060.00615.44
7.2.180.0110.00715.13
7.2.170.0060.01215.29
7.2.160.0130.00315.14
7.2.150.0130.00317.07
7.2.140.0000.01716.92
7.2.130.0050.01017.10
7.2.120.0020.01217.21
7.2.110.0030.01017.15
7.2.100.0090.00917.14
7.2.90.0060.00817.31
7.2.80.0080.00716.97
7.2.70.0080.00817.25
7.2.60.0040.00717.03
7.2.50.0070.00517.07
7.2.40.0020.01217.18
7.2.30.0080.01017.26
7.2.20.0040.00917.12
7.2.10.0050.00817.17
7.2.00.0070.00817.15
7.1.330.0040.01116.09
7.1.320.0060.00915.94
7.1.310.0080.00415.68
7.1.300.0000.01715.70
7.1.290.0030.01016.12
7.1.280.0000.01515.73
7.1.270.0040.00815.61
7.1.260.0050.00516.10
7.1.250.0050.00715.97
7.1.240.0040.00915.98
7.1.230.0090.00516.13
7.1.220.0030.01216.03
7.1.210.0030.01016.13
7.1.200.0060.00715.99
7.1.190.0030.01215.97
7.1.180.0060.00616.01
7.1.170.0070.00716.08
7.1.160.0030.00815.75
7.1.150.0070.00715.86
7.1.140.0090.00915.92
7.1.130.0070.00816.20
7.1.120.0070.00616.13
7.1.110.0040.00616.14
7.1.100.0030.01316.88
7.1.90.0080.00716.11
7.1.80.0040.00915.90
7.1.70.0050.00616.52
7.1.60.0080.00917.02
7.1.50.0170.00622.38
7.1.40.0070.00915.97
7.1.30.0100.00516.02
7.1.20.0080.00716.09
7.1.10.0000.01415.93
7.1.00.0030.01718.20
7.0.330.0090.00315.46
7.0.320.0090.00315.51
7.0.310.0050.00915.45
7.0.300.0070.00615.59
7.0.290.0050.00715.67
7.0.280.0090.00615.62
7.0.270.0020.01115.69
7.0.260.0030.01015.57
7.0.250.0050.01115.51
7.0.240.0040.00415.46
7.0.230.0050.00715.72
7.0.220.0010.00715.69
7.0.210.0020.00815.43
7.0.200.0130.00715.51
7.0.190.0070.00715.38
7.0.180.0070.00315.63
7.0.170.0020.00615.61
7.0.160.0090.00415.67
7.0.150.0050.01015.39
7.0.140.0070.03017.77
7.0.130.0080.00515.52
7.0.120.0070.01917.73
7.0.110.0060.00815.42
7.0.100.0060.00615.63
7.0.90.0070.00815.72
7.0.80.0080.00515.66
7.0.70.0040.00615.66
7.0.60.0010.02517.20
7.0.50.0040.02016.42
7.0.40.0110.01415.80
7.0.30.0070.02015.67
7.0.20.0130.02215.88
7.0.10.0150.03015.97
7.0.00.0060.03415.83
5.6.400.0070.00714.31
5.6.390.0080.00714.69
5.6.380.0030.01114.37
5.6.370.0090.00414.42
5.6.360.0080.00714.46
5.6.350.0020.00814.65
5.6.340.0110.00514.76
5.6.330.0030.00814.68
5.6.320.0060.00914.35
5.6.310.0080.00314.76
5.6.300.0060.00614.61
5.6.290.0060.00814.72
5.6.280.0080.02716.68
5.6.270.0050.00714.55
5.6.260.0050.01014.77
5.6.250.0050.00814.74
5.6.240.0020.01114.48
5.6.230.0020.01114.64
5.6.220.0030.01214.66
5.6.210.0070.03116.56
5.6.200.0050.03415.71
5.6.190.0080.03516.54
5.6.180.0110.02216.54
5.6.170.0120.03216.64
5.6.160.0040.02216.60
5.6.150.0060.02715.75
5.6.140.0080.02615.66
5.6.130.0090.02715.81
5.6.120.0020.02816.61
5.6.110.0070.03116.56
5.6.100.0030.03216.68
5.6.90.0040.03416.73
5.6.80.0040.03016.33
5.6.70.0080.00214.37
5.6.60.0060.00914.58
5.6.50.0080.00614.47
5.6.40.0040.00614.41
5.6.30.0030.01014.47
5.6.20.0040.01214.36
5.6.10.0080.00614.58
5.6.00.0060.00614.54
5.5.380.0030.00712.83
5.5.370.0100.00313.07
5.5.360.0040.00913.11
5.5.350.0150.02915.49
5.5.340.0060.03014.62
5.5.330.0020.02015.49
5.5.320.0080.02015.46
5.5.310.0150.03115.49
5.5.300.0070.02914.70
5.5.290.0100.02814.68
5.5.280.0070.03015.63
5.5.270.0050.02915.62
5.5.260.0090.02815.48
5.5.250.0090.03115.52
5.5.240.0100.02415.33
5.5.230.0090.00313.03
5.5.220.0080.00312.76
5.5.210.0050.00912.77
5.5.200.0050.00412.84
5.5.190.0030.00613.08
5.5.180.0030.00712.77
5.5.170.0040.01112.83
5.5.160.0050.00712.97
5.5.150.0030.00612.79
5.5.140.0030.00812.72
5.5.130.0070.00512.96
5.5.120.0060.00512.93
5.5.110.0070.00612.76
5.5.100.0020.00913.02
5.5.90.0070.00212.79
5.5.80.0030.00812.76
5.5.70.0030.01012.82
5.5.60.0020.01012.80
5.5.50.0030.00712.83
5.5.40.0060.00512.96
5.5.30.0090.00312.88
5.5.20.0050.00512.84
5.5.10.0060.00312.85
5.5.00.0080.00112.82
5.4.450.0050.02514.03
5.4.440.0040.02214.08
5.4.430.0060.03014.10
5.4.420.0050.02213.98
5.4.410.0060.02814.04
5.4.400.0040.01614.02
5.4.390.0060.02813.95
5.4.380.0090.02613.91
5.4.370.0040.03313.83
5.4.360.0020.03213.96
5.4.350.0060.02713.96
5.4.340.0090.01313.91
5.4.330.0030.00711.34
5.4.320.0040.02414.00
5.4.310.0070.02013.92
5.4.300.0060.01614.00
5.4.290.0030.03313.93
5.4.280.0090.02613.91
5.4.270.0050.01813.90
5.4.260.0090.02313.76
5.4.250.0050.02713.92
5.4.240.0070.01713.93
5.4.230.0050.02513.88
5.4.220.0010.03013.95
5.4.210.0010.03214.00
5.4.200.0030.02513.98
5.4.190.0100.01913.90
5.4.180.0070.02713.86
5.4.170.0080.02414.04
5.4.160.0020.03213.86
5.4.150.0100.02413.99
5.4.140.0050.02013.14
5.4.130.0090.02713.07
5.4.120.0070.01813.09
5.4.110.0050.01913.04
5.4.100.0050.01613.02
5.4.90.0060.01813.04
5.4.80.0040.01913.03
5.4.70.0030.02613.07
5.4.60.0050.03113.08
5.4.50.0040.03112.92
5.4.40.0080.02713.03
5.4.30.0020.02313.10
5.4.20.0060.03012.95
5.4.10.0090.01813.02
5.4.00.0040.01812.84
5.3.290.0060.02212.38
5.3.280.0030.03312.40
5.3.270.0060.02412.35
5.3.260.0060.02912.35
5.3.250.0040.03112.35
5.3.240.0080.02812.35
5.3.230.0060.02912.31
5.3.220.0080.01512.34
5.3.210.0060.01512.33
5.3.200.0070.01512.33
5.3.190.0050.02912.35
5.3.180.0060.02112.36
5.3.170.0090.02612.30
5.3.160.0080.03012.34
5.3.150.0050.02312.32
5.3.140.0100.02812.39
5.3.130.0070.02312.34
5.3.120.0090.02512.34
5.3.110.0050.03012.33
5.3.100.0030.02912.21
5.3.90.0080.02712.15
5.3.80.0060.01912.17
5.3.70.0100.01712.12
5.3.60.0050.01512.18
5.3.50.0040.02512.13
5.3.40.0030.03012.13
5.3.30.0030.03012.08
5.3.20.0070.01412.07
5.3.10.0070.01312.00
5.3.00.0080.01312.06
5.2.170.0040.03410.96
5.2.160.0090.02810.95
5.2.150.0110.01711.03
5.2.140.0060.02610.94
5.2.130.0030.01711.01
5.2.120.0030.02011.01
5.2.110.0070.01710.96
5.2.100.0030.02110.98
5.2.90.0030.02010.99
5.2.80.0040.01610.97
5.2.70.0000.01911.09
5.2.60.0080.01310.96
5.2.50.0030.01810.96
5.2.40.0040.01710.87
5.2.30.0040.01910.94
5.2.20.0020.01910.90
5.2.10.0060.02210.85
5.2.00.0060.02110.89
5.1.60.0080.02610.44
5.1.50.0040.01310.45
5.1.40.0030.01510.45
5.1.30.0040.01710.70
5.1.20.0020.01610.62
5.1.10.0040.01310.57
5.1.00.0020.01710.47
5.0.50.0050.0149.73
5.0.40.0030.0139.67
5.0.30.0020.0209.54
5.0.20.0040.0129.54
5.0.10.0020.0129.54
5.0.00.0040.0159.53
4.4.90.0020.0109.52
4.4.80.0030.0089.52
4.4.70.0000.0169.52
4.4.60.0030.0139.52
4.4.50.0020.0109.52
4.4.40.0060.0219.52
4.4.30.0030.0109.52
4.4.20.0040.0089.52
4.4.10.0010.0129.52
4.4.00.0060.0129.52
4.3.110.0020.0109.52
4.3.100.0040.0089.52
4.3.90.0050.0089.52
4.3.80.0040.0149.52
4.3.70.0020.0109.52
4.3.60.0030.0089.52
4.3.50.0030.0109.52
4.3.40.0010.0159.52
4.3.30.0050.0089.52
4.3.20.0040.0099.52
4.3.10.0050.0079.52
4.3.00.0000.0119.52

preferences:
47.82 ms | 401 KiB | 5 Q