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.00718.43
8.3.50.0170.00221.97
8.3.40.0070.00718.93
8.3.30.0090.00618.96
8.3.20.0040.00418.98
8.3.10.0000.00821.09
8.3.00.0030.00523.53
8.2.180.0110.01117.00
8.2.170.0070.01122.96
8.2.160.0070.00720.35
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0050.00319.56
8.2.110.0000.01120.56
8.2.100.0040.00817.97
8.2.90.0000.00919.30
8.2.80.0040.00418.05
8.2.70.0000.00817.88
8.2.60.0060.00317.93
8.2.50.0030.00518.07
8.2.40.0040.00418.22
8.2.30.0040.00421.36
8.2.20.0030.00517.78
8.2.10.0040.00417.98
8.2.00.0030.00617.99
8.1.280.0090.01225.92
8.1.270.0070.00023.99
8.1.260.0000.00926.35
8.1.250.0040.00428.09
8.1.240.0040.00422.61
8.1.230.0000.01120.98
8.1.220.0000.00918.77
8.1.210.0080.00018.91
8.1.200.0030.00617.48
8.1.190.0040.00417.41
8.1.180.0030.00618.10
8.1.170.0040.00418.77
8.1.160.0040.00418.99
8.1.150.0080.00018.81
8.1.140.0040.00417.64
8.1.130.0000.00817.89
8.1.120.0040.00417.64
8.1.110.0000.01017.63
8.1.100.0000.00717.67
8.1.90.0000.00717.62
8.1.80.0030.00517.64
8.1.70.0030.00617.55
8.1.60.0040.00417.86
8.1.50.0040.00417.71
8.1.40.0040.00417.71
8.1.30.0030.00617.81
8.1.20.0000.00817.88
8.1.10.0000.00717.81
8.1.00.0030.00517.61
8.0.300.0040.00420.14
8.0.290.0000.00717.43
8.0.280.0030.00318.47
8.0.270.0060.00317.41
8.0.260.0030.00317.06
8.0.250.0040.00417.21
8.0.240.0050.00317.08
8.0.230.0080.00017.23
8.0.220.0060.00317.12
8.0.210.0030.00317.16
8.0.200.0000.00617.18
8.0.190.0050.00317.13
8.0.180.0040.00417.22
8.0.170.0040.00417.05
8.0.160.0000.00717.10
8.0.150.0080.00017.15
8.0.140.0000.00817.11
8.0.130.0030.00613.56
8.0.120.0000.00717.00
8.0.110.0050.00317.19
8.0.100.0050.00317.24
8.0.90.0070.00017.08
8.0.80.0000.01517.11
8.0.70.0080.00016.95
8.0.60.0030.00516.98
8.0.50.0040.00417.05
8.0.30.0130.00917.14
8.0.20.0070.01117.40
8.0.10.0050.00217.30
8.0.00.0130.00816.87
7.4.330.0060.00014.95
7.4.320.0000.00716.82
7.4.300.0050.00216.76
7.4.290.0020.00516.70
7.4.280.0030.00316.81
7.4.270.0040.00416.85
7.4.260.0000.00613.44
7.4.250.0030.00516.80
7.4.240.0030.00516.86
7.4.230.0030.00316.66
7.4.220.0060.01116.71
7.4.210.0070.01116.82
7.4.200.0000.00716.64
7.4.190.0040.00416.64
7.4.160.0120.00316.57
7.4.150.0090.00917.40
7.4.140.0100.00917.86
7.4.130.0070.01016.78
7.4.120.0040.01216.81
7.4.110.0110.00716.73
7.4.100.0110.00716.75
7.4.90.0210.00416.77
7.4.80.0130.00319.37
7.4.70.0140.00716.63
7.4.60.0040.01316.71
7.4.50.0040.00416.68
7.4.40.0110.00322.52
7.4.30.0050.01116.70
7.4.10.0130.00615.16
7.4.00.0070.01015.25
7.3.330.0060.00013.23
7.3.320.0030.00213.19
7.3.310.0000.00816.33
7.3.300.0030.00316.32
7.3.290.0080.01316.57
7.3.280.0070.00816.48
7.3.270.0070.01017.40
7.3.260.0100.00918.24
7.3.250.0110.00616.69
7.3.240.0070.01416.54
7.3.230.0060.00916.59
7.3.210.0100.01016.82
7.3.200.0030.01419.39
7.3.190.0100.00616.73
7.3.180.0100.00716.46
7.3.170.0100.00716.55
7.3.160.0040.01116.73
7.3.130.0090.00615.24
7.3.120.0060.00915.04
7.3.110.0090.00915.00
7.3.100.0080.00815.02
7.3.90.0030.01115.08
7.3.80.0050.00815.18
7.3.70.0050.00615.09
7.3.60.0060.00614.97
7.3.50.0040.01115.08
7.3.40.0050.00715.09
7.3.30.0000.01215.23
7.3.20.0120.00316.82
7.3.10.0090.00916.77
7.3.00.0050.00816.72
7.2.330.0090.00916.83
7.2.320.0090.00916.97
7.2.310.0120.00616.96
7.2.300.0090.00917.03
7.2.290.0030.01516.89
7.2.260.0090.00615.40
7.2.250.0080.01015.30
7.2.240.0130.00515.43
7.2.230.0060.01015.51
7.2.220.0120.00215.36
7.2.210.0090.00615.37
7.2.200.0020.01215.17
7.2.190.0100.00515.41
7.2.180.0070.01015.23
7.2.170.0050.01015.11
7.2.160.0070.00715.43
7.2.150.0000.01817.11
7.2.140.0070.01017.37
7.2.130.0110.00516.97
7.2.120.0100.00517.12
7.2.110.0110.00717.07
7.2.100.0100.00817.02
7.2.90.0070.00817.15
7.2.80.0080.00817.13
7.2.70.0040.01017.11
7.2.60.0100.00717.18
7.2.50.0120.00617.18
7.2.40.0070.01017.15
7.2.30.0100.00617.00
7.2.20.0080.00816.99
7.2.10.0080.00716.96
7.2.00.0090.00917.12
7.1.330.0090.00616.01
7.1.320.0070.00716.18
7.1.310.0050.00915.97
7.1.300.0110.00516.08
7.1.290.0030.00716.07
7.1.280.0050.01016.05
7.1.270.0040.01015.94
7.1.260.0060.00815.92
7.1.250.0080.00815.81
7.1.240.0050.00815.97
7.1.230.0070.00915.93
7.1.220.0040.00616.03
7.1.210.0070.00715.98
7.1.200.0050.00616.10
7.1.190.0060.00915.80
7.1.180.0080.00416.02
7.1.170.0070.00415.78
7.1.160.0080.00315.93
7.1.150.0050.00716.08
7.1.140.0060.00615.84
7.1.130.0060.00516.04
7.1.120.0050.00515.98
7.1.110.0030.00716.15
7.1.100.0050.00516.06
7.1.90.0090.00515.83
7.1.80.0080.00615.94
7.1.70.0040.00616.62
7.1.60.0010.01117.13
7.1.50.0110.00616.50
7.1.40.0030.00816.01
7.1.30.0090.00315.99
7.1.20.0060.00915.82
7.1.10.0090.00316.17
7.1.00.0060.01618.05
7.0.330.0050.01015.64
7.0.320.0080.00415.76
7.0.310.0100.00515.74
7.0.300.0030.00715.53
7.0.290.0030.01015.43
7.0.280.0070.00215.64
7.0.270.0000.01115.52
7.0.260.0020.01015.64
7.0.250.0030.00815.77
7.0.240.0080.00715.53
7.0.230.0060.00815.59
7.0.220.0000.01315.44
7.0.210.0030.01215.72
7.0.200.0030.00915.89
7.0.190.0040.00415.58
7.0.180.0050.00815.79
7.0.170.0030.01015.57
7.0.160.0100.00315.65
7.0.150.0060.00415.44
7.0.140.0020.03017.68
7.0.130.0050.01015.79
7.0.120.0080.00915.59
7.0.110.0070.00415.47
7.0.100.0070.00515.70
7.0.90.0040.00915.50
7.0.80.0040.00915.62
7.0.70.0060.02817.64
7.0.60.0080.01717.70
7.0.50.0080.02817.83
7.0.40.0040.02115.85
7.0.30.0060.02315.84
7.0.20.0070.02815.70
7.0.10.0030.03415.72
7.0.00.0040.03215.75
5.6.400.0090.00614.22
5.6.390.0030.00914.58
5.6.380.0070.00714.87
5.6.370.0050.01014.79
5.6.360.0060.00714.57
5.6.350.0100.00514.71
5.6.340.0050.00414.68
5.6.330.0060.00414.56
5.6.320.0070.00614.67
5.6.310.0050.00914.34
5.6.300.0010.01314.51
5.6.290.0090.00514.52
5.6.280.0040.03116.74
5.6.270.0040.00514.60
5.6.260.0080.00614.63
5.6.250.0090.00414.60
5.6.240.0080.00714.69
5.6.230.0080.00414.62
5.6.220.0080.03116.63
5.6.210.0030.03216.36
5.6.200.0030.03316.64
5.6.190.0050.03316.70
5.6.180.0050.03416.64
5.6.170.0090.01916.62
5.6.160.0070.03016.76
5.6.150.0060.03416.74
5.6.140.0060.03016.69
5.6.130.0060.02016.79
5.6.120.0050.03016.53
5.6.110.0080.03116.78
5.6.100.0100.01416.68
5.6.90.0070.02716.68
5.6.80.0030.02716.51
5.6.70.0070.02716.40
5.6.60.0070.03016.43
5.6.50.0030.03216.52
5.6.40.0080.03016.56
5.6.30.0030.02516.43
5.6.20.0030.03016.40
5.6.10.0100.02416.45
5.6.00.0050.03016.31
5.5.380.0070.00713.01
5.5.370.0080.00512.91
5.5.360.0060.03215.40
5.5.350.0040.02315.34
5.5.340.0060.02015.54
5.5.330.0070.02415.52
5.5.320.0090.02815.60
5.5.310.0060.01915.51
5.5.300.0060.03015.51
5.5.290.0060.03015.65
5.5.280.0010.02415.41
5.5.270.0050.03215.57
5.5.260.0070.03315.59
5.5.250.0060.03115.37
5.5.240.0020.03215.37
5.5.230.0020.03615.43
5.5.220.0060.02915.30
5.5.210.0020.03515.35
5.5.200.0050.02915.43
5.5.190.0080.02915.29
5.5.180.0070.02815.40
5.5.170.0050.00812.89
5.5.160.0040.03015.41
5.5.150.0050.02315.31
5.5.140.0050.02815.38
5.5.130.0070.01815.38
5.5.120.0050.02515.31
5.5.110.0090.02415.44
5.5.100.0080.02915.18
5.5.90.0030.03415.39
5.5.80.0040.02415.26
5.5.70.0030.03015.34
5.5.60.0070.02815.24
5.5.50.0020.02315.34
5.5.40.0040.02015.25
5.5.30.0070.02915.31
5.5.20.0030.02615.27
5.5.10.0060.02915.16
5.5.00.0030.03115.28
5.4.450.0060.02314.75
5.4.440.0050.03014.65
5.4.430.0030.02114.79
5.4.420.0020.02114.62
5.4.410.0040.03214.59
5.4.400.0010.03014.59
5.4.390.0070.02914.62
5.4.380.0060.02614.55
5.4.370.0070.02714.47
5.4.360.0030.02414.55
5.4.350.0030.01614.48
5.4.340.0040.02914.67
5.4.330.0050.00612.31
5.4.320.0020.02914.60
5.4.310.0050.02014.49
5.4.300.0050.02814.44
5.4.290.0040.01614.57
5.4.280.0020.02114.63
5.4.270.0030.02814.62
5.4.260.0090.02714.45
5.4.250.0070.02514.49
5.4.240.0040.03114.60
5.4.230.0030.02114.63
5.4.220.0040.03014.61
5.4.210.0030.03014.65
5.4.200.0030.01914.61
5.4.190.0030.01814.58
5.4.180.0070.02614.58
5.4.170.0050.02814.57
5.4.160.0050.03014.49
5.4.150.0040.03014.59
5.4.140.0020.03013.76
5.4.130.0090.02213.60
5.4.120.0050.02713.70
5.4.110.0070.02713.76
5.4.100.0030.02213.68
5.4.90.0040.02413.65
5.4.80.0040.02813.73
5.4.70.0060.02713.70
5.4.60.0050.02813.59
5.4.50.0030.02713.69
5.4.40.0050.02913.68
5.4.30.0060.02513.59
5.4.20.0050.02913.62
5.4.10.0020.02413.58
5.4.00.0070.02313.53
5.3.290.0040.02612.93
5.3.280.0040.02612.89
5.3.270.0030.03112.92
5.3.260.0060.02312.91
5.3.250.0030.03012.93
5.3.240.0090.01812.88
5.3.230.0030.03112.91
5.3.220.0030.02512.89
5.3.210.0040.02512.88
5.3.200.0010.03112.90
5.3.190.0050.02012.80
5.3.180.0010.02612.89
5.3.170.0080.02712.95
5.3.160.0040.03112.96
5.3.150.0050.02612.94
5.3.140.0020.02312.87
5.3.130.0040.02512.83
5.3.120.0030.02312.89
5.3.110.0050.02312.90
5.3.100.0020.03312.75
5.3.90.0080.02012.71
5.3.80.0020.03112.59
5.3.70.0050.02412.55
5.3.60.0050.02512.76
5.3.50.0000.02512.63
5.3.40.0050.02612.66
5.3.30.0040.02612.63
5.3.20.0060.02212.61
5.3.10.0020.01912.48
5.3.00.0030.02612.50
5.2.170.0000.03811.04
5.2.160.0030.02010.99
5.2.150.0020.03310.86
5.2.140.0070.03010.96
5.2.130.0050.02010.99
5.2.120.0000.03010.87
5.2.110.0050.02711.02
5.2.100.0030.02511.01
5.2.90.0030.02110.97
5.2.80.0040.02110.94
5.2.70.0070.01810.94
5.2.60.0120.02710.80
5.2.50.0040.03510.94
5.2.40.0030.03210.95
5.2.30.0030.03311.00
5.2.20.0060.03110.86
5.2.10.0000.02810.88
5.2.00.0030.03010.89
5.1.60.0080.01310.56
5.1.50.0030.02810.38
5.1.40.0030.02610.44
5.1.30.0050.03010.63
5.1.20.0020.02710.66
5.1.10.0020.03310.42
5.1.00.0000.03410.34
5.0.50.0050.02510.31
5.0.40.0030.02610.31
5.0.30.0010.03510.31
5.0.20.0040.01710.31
5.0.10.0060.02210.31
5.0.00.0040.02510.31
4.4.90.0010.02210.31
4.4.80.0020.02010.31
4.4.70.0000.01510.31
4.4.60.0060.01010.31
4.4.50.0030.01510.31
4.4.40.0030.03010.31
4.4.30.0020.02210.31
4.4.20.0010.01510.31
4.4.10.0030.02110.31
4.4.00.0000.03110.31
4.3.110.0030.02010.31
4.3.100.0000.01810.31
4.3.90.0010.01410.31
4.3.80.0000.01910.31
4.3.70.0020.01310.31
4.3.60.0000.01410.31
4.3.50.0010.02110.31
4.3.40.0000.02110.31
4.3.30.0000.02310.31
4.3.20.0030.01310.31
4.3.10.0000.01710.31
4.3.00.0020.01310.31

preferences:
44.08 ms | 401 KiB | 5 Q