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.40.0110.00319.09
8.3.30.0070.01019.04
8.3.20.0030.00518.81
8.3.10.0040.00420.77
8.3.00.0000.01621.82
8.2.170.0140.00422.96
8.2.160.0070.00720.44
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0060.00326.16
8.2.120.0040.00419.73
8.2.110.0070.00322.33
8.2.100.0080.00317.97
8.2.90.0080.00019.17
8.2.80.0000.00817.97
8.2.70.0080.00017.88
8.2.60.0000.00818.04
8.2.50.0000.00918.07
8.2.40.0050.00318.28
8.2.30.0040.00420.04
8.2.20.0060.00317.95
8.2.10.0040.00417.79
8.2.00.0060.00317.85
8.1.270.0050.00323.99
8.1.260.0030.00626.35
8.1.250.0050.00328.09
8.1.240.0030.00622.42
8.1.230.0040.00820.93
8.1.220.0090.00018.77
8.1.210.0050.00319.03
8.1.200.0100.00017.48
8.1.190.0030.00517.51
8.1.180.0040.00418.10
8.1.170.0000.00918.59
8.1.160.0040.00418.93
8.1.150.0000.00818.77
8.1.140.0080.00017.63
8.1.130.0000.00717.89
8.1.120.0000.00817.53
8.1.110.0050.00217.54
8.1.100.0080.00017.65
8.1.90.0070.00017.54
8.1.80.0000.00817.68
8.1.70.0000.00717.57
8.1.60.0040.00417.82
8.1.50.0040.00417.73
8.1.40.0000.00717.74
8.1.30.0030.00617.91
8.1.20.0000.00817.90
8.1.10.0080.00017.77
8.1.00.0000.00717.77
8.0.300.0070.00020.29
8.0.290.0000.00816.88
8.0.280.0050.00318.61
8.0.270.0000.00717.37
8.0.260.0040.00418.56
8.0.250.0070.00017.17
8.0.240.0080.00017.18
8.0.230.0040.00417.07
8.0.220.0000.00717.18
8.0.210.0080.00017.13
8.0.200.0070.00017.18
8.0.190.0000.00817.21
8.0.180.0030.00617.05
8.0.170.0000.00817.13
8.0.160.0050.00217.04
8.0.150.0030.00617.18
8.0.140.0080.00617.05
8.0.130.0030.00313.56
8.0.120.0080.00016.98
8.0.110.0040.00416.91
8.0.100.0040.00417.18
8.0.90.0030.00516.95
8.0.80.0060.00917.08
8.0.70.0050.00317.08
8.0.60.0040.00417.20
8.0.50.0000.00817.12
8.0.30.0090.01017.39
8.0.20.0080.01017.40
8.0.10.0000.00717.14
8.0.00.0090.01217.03
7.4.330.0050.00014.91
7.4.320.0000.00716.83
7.4.300.0050.00216.73
7.4.290.0030.00316.76
7.4.280.0070.00016.83
7.4.270.0000.00816.81
7.4.260.0030.00613.56
7.4.250.0000.00816.79
7.4.240.0030.00316.73
7.4.230.0000.00716.91
7.4.220.0170.00016.78
7.4.210.0070.00916.83
7.4.200.0040.00416.61
7.4.190.0040.00416.71
7.4.160.0160.00016.84
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0090.01116.64
7.4.120.0060.01216.75
7.4.110.0030.01416.98
7.4.100.0120.00916.75
7.4.90.0110.00716.73
7.4.80.0100.00619.04
7.4.70.0070.01016.88
7.4.60.0140.00716.68
7.4.50.0030.00616.54
7.4.40.0070.00722.27
7.4.30.0180.00616.70
7.4.00.0000.01515.16
7.3.330.0050.00013.24
7.3.320.0000.00613.19
7.3.310.0070.00016.34
7.3.300.0000.00616.55
7.3.290.0030.01116.57
7.3.280.0090.00716.48
7.3.270.0140.00417.40
7.3.260.0100.00818.24
7.3.250.0040.01716.81
7.3.240.0090.00916.86
7.3.230.0140.00416.66
7.3.210.0080.01616.73
7.3.200.0030.01319.39
7.3.190.0060.01216.82
7.3.180.0060.00916.43
7.3.170.0080.00816.76
7.3.160.0060.01516.54
7.3.120.0070.01015.24
7.3.110.0070.01015.12
7.3.100.0150.00315.02
7.3.90.0160.00015.38
7.3.80.0060.00614.91
7.3.70.0070.00314.93
7.3.60.0150.00015.20
7.3.50.0030.00914.87
7.3.40.0040.00914.87
7.3.30.0110.00314.87
7.3.20.0080.00816.98
7.3.10.0060.01016.74
7.3.00.0020.01316.73
7.2.330.0070.01016.84
7.2.320.0140.01116.64
7.2.310.0130.00716.95
7.2.300.0070.01416.80
7.2.290.0100.01316.86
7.2.250.0090.00914.90
7.2.240.0130.00615.52
7.2.230.0060.01015.41
7.2.220.0100.00015.19
7.2.210.0090.00615.48
7.2.200.0070.00315.32
7.2.190.0090.00615.35
7.2.180.0100.00715.18
7.2.170.0090.00615.29
7.2.130.0080.00317.20
7.2.120.0070.01017.16
7.2.110.0120.00316.88
7.2.100.0100.00617.08
7.2.90.0060.00617.29
7.2.80.0040.01116.93
7.2.70.0070.00417.33
7.2.60.0040.00917.20
7.2.50.0120.00317.10
7.2.40.0060.00916.81
7.2.30.0000.01417.19
7.2.20.0090.00617.30
7.2.10.0090.00617.04
7.2.00.0030.00617.05
7.1.330.0150.00016.14
7.1.320.0000.01315.86
7.1.310.0040.01416.20
7.1.300.0040.01016.02
7.1.290.0030.01016.11
7.1.280.0060.00615.64
7.1.270.0090.00315.59
7.1.260.0040.01116.14
7.1.250.0000.00915.91
7.1.240.0090.00015.82
7.1.230.0040.01216.07
7.1.220.0000.00916.13
7.1.210.0030.00916.15
7.1.200.0050.01016.15
7.1.190.0030.01216.11
7.1.180.0030.00715.93
7.1.170.0030.01016.09
7.1.160.0060.00316.03
7.1.150.0000.00916.12
7.1.140.0030.00916.10
7.1.130.0060.00315.86
7.1.120.0060.00916.14
7.1.110.0070.00716.11
7.1.100.0010.01217.21
7.1.90.0060.00916.18
7.1.80.0070.00315.89
7.1.70.0000.01316.68
7.1.60.0080.01017.70
7.1.50.0020.01616.63
7.1.40.0100.00316.09
7.1.30.0020.00515.95
7.1.20.0130.00015.74
7.1.10.0000.01316.09
7.1.00.0090.03719.06
7.0.330.0060.00915.53
7.0.320.0030.01015.71
7.0.310.0060.00315.59
7.0.300.0060.00315.58
7.0.290.0000.01615.73
7.0.280.0030.00615.46
7.0.270.0130.00315.73
7.0.260.0070.00315.57
7.0.250.0030.00915.74
7.0.240.0030.01115.50
7.0.230.0060.00915.50
7.0.220.0090.00615.43
7.0.210.0140.00015.73
7.0.200.0020.00816.19
7.0.190.0000.00815.59
7.0.180.0000.01315.46
7.0.170.0100.00315.48
7.0.160.0070.00715.53
7.0.150.0030.00715.62
7.0.140.0080.03518.89
7.0.130.0070.00315.55
7.0.120.0000.01115.82
7.0.110.0000.01315.56
7.0.100.0070.00315.40
7.0.90.0110.00415.51
7.0.80.0040.01115.51
7.0.70.0040.01115.43
7.0.60.0030.04417.68
7.0.50.0080.02316.72
7.0.40.0040.02615.50
7.0.30.0070.04615.54
7.0.20.0020.04015.78
7.0.10.0070.04415.71
7.0.00.0050.03015.64
5.6.380.0030.01314.42
5.6.370.0110.00414.60
5.6.360.0040.01114.62
5.6.350.0100.00714.34
5.6.340.0070.00314.59
5.6.330.0040.01114.85
5.6.320.0120.00414.43
5.6.310.0000.01214.27
5.6.300.0130.00314.69
5.6.290.0000.01114.86
5.6.280.0000.01514.76
5.6.270.0070.00714.50
5.6.260.0060.00914.63
5.6.250.0070.00714.27
5.6.240.0030.00614.52
5.6.230.0090.00614.50
5.6.220.0040.00414.48
5.6.210.0070.04217.51
5.6.200.0080.02616.21
5.6.190.0030.02316.36
5.6.180.0020.02716.36
5.6.170.0050.04316.47
5.6.160.0060.03016.39
5.6.150.0060.02616.28
5.6.140.0060.04316.47
5.6.130.0070.02816.21
5.6.120.0060.04316.32
5.6.110.0030.03316.29
5.6.100.0090.04516.31
5.6.90.0070.03516.23
5.6.80.0020.02615.83
5.6.70.0040.03015.85
5.6.60.0030.02916.05
5.6.50.0020.03815.94
5.6.40.0050.03316.06
5.6.30.0100.04016.05
5.6.20.0100.04215.90
5.6.10.0070.02815.97
5.6.00.0060.03915.97
5.5.380.0060.00311.08
5.5.370.0000.00711.53
5.5.360.0030.00911.40
5.5.350.0230.03616.02
5.5.340.0040.02414.68
5.5.330.0090.01614.75
5.5.320.0030.03314.50
5.5.310.0070.03214.49
5.5.300.0030.04714.79
5.5.290.0030.04314.74
5.5.280.0050.02914.59
5.5.270.0050.04114.64
5.5.260.0060.03814.75
5.5.250.0030.02614.60
5.5.240.0080.03814.31
5.5.230.0020.04614.32
5.5.220.0100.03714.27
5.5.210.0100.02214.36
5.5.200.0040.04114.16
5.5.190.0070.04014.27
5.5.180.0050.03814.36
5.5.170.0040.00411.24
5.5.160.0130.03514.16
5.5.150.0040.02714.33
5.5.140.0070.04214.31
5.5.130.0070.02914.41
5.5.120.0060.03814.36
5.5.110.0020.03514.27
5.5.100.0050.03314.24
5.5.90.0050.04214.11
5.5.80.0010.04314.23
5.5.70.0050.04114.16
5.5.60.0060.04214.31
5.5.50.0080.04214.31
5.5.40.0050.03114.12
5.5.30.0100.03714.28
5.5.20.0030.03414.23
5.5.10.0040.03814.26
5.5.00.0030.02414.20
5.4.450.0030.03215.35
5.4.440.0060.02315.41
5.4.430.0080.04015.21
5.4.420.0030.04015.40
5.4.410.0070.03115.19
5.4.400.0070.03415.06
5.4.390.0040.02215.21
5.4.380.0040.02414.96
5.4.370.0030.04215.11
5.4.360.0050.04215.08
5.4.350.0080.04215.06
5.4.340.0070.04014.97
5.4.330.0040.00411.10
5.4.320.0060.02815.09
5.4.310.0090.02115.07
5.4.300.0080.02114.94
5.4.290.0060.03715.08
5.4.280.0050.03015.12
5.4.270.0070.03715.05
5.4.260.0030.03915.19
5.4.250.0020.04615.10
5.4.240.0090.02515.18
5.4.230.0050.02315.31
5.4.220.0070.03015.17
5.4.210.0030.03515.04
5.4.200.0050.04215.03
5.4.190.0100.02215.14
5.4.180.0060.03715.15
5.4.170.0030.04015.11
5.4.160.0040.03115.07
5.4.150.0050.02215.14
5.4.140.0060.02613.95
5.4.130.0050.03813.75
5.4.120.0030.03813.69
5.4.110.0040.03313.86
5.4.100.0050.04013.83
5.4.90.0050.03813.77
5.4.80.0030.03313.85
5.4.70.0060.03713.79
5.4.60.0080.03813.72
5.4.50.0070.03213.88
5.4.40.0140.03113.81
5.4.30.0050.03213.84
5.4.20.0050.03813.62
5.4.10.0050.03913.68
5.4.00.0060.02313.35
5.3.290.0030.04012.88
5.3.280.0040.03812.78
5.3.270.0080.02512.78
5.3.260.0060.02012.78
5.3.250.0110.03912.72
5.3.240.0040.02012.78
5.3.230.0030.02412.80
5.3.220.0080.02312.78
5.3.210.0070.03512.76
5.3.200.0030.02812.70
5.3.190.0060.02612.75
5.3.180.0060.03812.68
5.3.170.0060.02112.76
5.3.160.0020.04212.75
5.3.150.0110.03712.77
5.3.140.0060.01812.67
5.3.130.0050.02812.75
5.3.120.0080.03712.70
5.3.110.0100.03812.77
5.3.100.0030.02212.51
5.3.90.0030.02212.45
5.3.80.0060.04212.47
5.3.70.0050.03412.49
5.3.60.0050.04112.50
5.3.50.0080.03712.38
5.3.40.0030.04312.46
5.3.30.0030.03412.40
5.3.20.0100.03512.35
5.3.10.0050.04012.33
5.3.00.0050.03512.30
5.2.170.0020.02311.04
5.2.160.0040.01711.15
5.2.150.0000.03811.04
5.2.140.0040.02511.06
5.2.130.0040.02311.04
5.2.120.0030.03711.04
5.2.110.0080.03311.05
5.2.100.0030.03511.02
5.2.90.0040.03611.03
5.2.80.0070.01810.97
5.2.70.0050.03611.07
5.2.60.0020.03610.96
5.2.50.0050.03510.93
5.2.40.0060.02310.98
5.2.30.0060.03210.96
5.2.20.0050.02810.91
5.2.10.0030.03310.99
5.2.00.0090.01810.84
5.1.60.0060.02610.54
5.1.50.0020.03410.52
5.1.40.0050.03010.53
5.1.30.0020.02410.67
5.1.20.0010.02610.66
5.1.10.0060.02010.54
5.1.00.0070.02810.58
5.0.50.0050.0179.81
5.0.40.0040.0129.73
5.0.30.0030.0339.59
5.0.20.0050.0239.52
5.0.10.0010.0199.63
5.0.00.0040.0209.57
4.4.90.0020.0179.44
4.4.80.0000.0179.44
4.4.70.0030.0149.44
4.4.60.0010.0169.44
4.4.50.0070.0179.44
4.4.40.0050.0289.44
4.4.30.0030.0159.44
4.4.20.0020.0189.44
4.4.10.0060.0159.44
4.4.00.0010.0239.44
4.3.110.0020.0159.44
4.3.100.0020.0209.44
4.3.90.0050.0139.44
4.3.80.0020.0159.44
4.3.70.0030.0189.44
4.3.60.0050.0149.44
4.3.50.0030.0149.44
4.3.40.0030.0299.44
4.3.30.0020.0159.44
4.3.20.0020.0189.44
4.3.10.0020.0199.44
4.3.00.0030.0139.44

preferences:
48.45 ms | 400 KiB | 5 Q