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 . ')<br />'; 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.0090.00918.43
8.3.50.0110.00922.04
8.3.40.0070.00718.69
8.3.30.0150.00619.39
8.3.20.0040.00420.19
8.3.10.0080.00022.08
8.3.00.0030.00522.39
8.2.180.0160.00318.54
8.2.170.0130.00622.96
8.2.160.0060.00920.96
8.2.150.0140.00324.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00319.73
8.2.110.0000.00920.31
8.2.100.0040.00818.09
8.2.90.0040.00419.35
8.2.80.0090.00317.97
8.2.70.0050.00517.88
8.2.60.0050.00318.05
8.2.50.0040.00418.07
8.2.40.0030.00718.22
8.2.30.0000.00818.23
8.2.20.0080.00017.96
8.2.10.0040.00417.86
8.2.00.0050.00317.91
8.1.280.0070.01325.92
8.1.270.0000.00923.71
8.1.260.0040.00426.35
8.1.250.0060.00928.09
8.1.240.0060.00323.92
8.1.230.0110.00019.09
8.1.220.0000.00817.78
8.1.210.0030.00518.77
8.1.200.0000.00917.47
8.1.190.0080.00017.51
8.1.180.0040.00418.10
8.1.170.0060.00318.84
8.1.160.0030.00622.07
8.1.150.0000.00818.78
8.1.140.0000.00717.54
8.1.130.0000.00817.85
8.1.120.0070.00017.67
8.1.110.0050.00317.64
8.1.100.0040.00417.66
8.1.90.0050.00317.61
8.1.80.0000.00717.61
8.1.70.0070.00017.54
8.1.60.0000.01017.90
8.1.50.0000.00817.75
8.1.40.0000.00817.66
8.1.30.0060.00317.81
8.1.20.0050.00317.79
8.1.10.0050.00317.82
8.1.00.0080.00017.61
8.0.300.0070.00018.77
8.0.290.0000.00717.30
8.0.280.0070.00018.43
8.0.270.0030.00317.30
8.0.260.0070.00017.07
8.0.250.0030.00317.29
8.0.240.0000.00717.16
8.0.230.0050.00217.14
8.0.220.0070.00017.02
8.0.210.0030.00317.10
8.0.200.0030.00517.15
8.0.190.0050.00317.18
8.0.180.0050.00217.19
8.0.170.0000.00817.15
8.0.160.0050.00217.07
8.0.150.0000.00716.98
8.0.140.0040.00417.14
8.0.130.0000.00613.52
8.0.120.0040.00417.02
8.0.110.0040.00416.96
8.0.100.0070.00017.16
8.0.90.0040.00416.94
8.0.80.0120.01217.11
8.0.70.0050.00217.14
8.0.60.0070.00017.15
8.0.50.0000.00717.02
8.0.30.0070.01217.30
8.0.20.0110.00817.40
8.0.10.0000.00717.15
8.0.00.0070.01216.79
7.4.330.0000.00615.12
7.4.320.0000.00616.68
7.4.300.0000.00716.75
7.4.290.0030.00316.83
7.4.280.0040.00416.66
7.4.270.0070.00016.74
7.4.260.0000.00716.86
7.4.250.0000.00716.70
7.4.240.0010.00616.86
7.4.230.0000.00716.64
7.4.220.0080.00816.78
7.4.210.0100.00616.89
7.4.200.0050.00316.58
7.4.190.0000.00716.89
7.4.160.0060.00916.56
7.4.150.0070.01017.40
7.4.140.0100.01317.86
7.4.130.0090.01016.81
7.4.120.0060.01216.78
7.4.110.0080.00816.86
7.4.100.0100.00716.72
7.4.90.0110.00717.02
7.4.80.0200.00316.52
7.4.70.0170.00416.66
7.4.60.0070.01016.74
7.4.50.0050.00016.77
7.4.40.0100.00322.77
7.4.30.0080.01016.73
7.4.00.0070.00715.20
7.3.330.0050.00013.20
7.3.320.0000.00813.44
7.3.310.0040.00416.44
7.3.300.0050.00216.34
7.3.290.0110.00316.46
7.3.280.0110.00816.50
7.3.270.0030.01317.40
7.3.260.0100.01016.84
7.3.250.0130.00516.73
7.3.240.0100.00616.62
7.3.230.0130.00616.84
7.3.210.0200.00316.75
7.3.200.0090.00919.39
7.3.190.0120.00616.48
7.3.180.0070.01016.81
7.3.170.0110.00716.56
7.3.160.0120.00616.41
7.3.120.0030.01214.87
7.3.110.0040.01114.95
7.3.100.0030.01015.35
7.3.90.0000.01515.06
7.3.80.0060.00314.70
7.3.70.0040.01214.93
7.3.60.0110.00715.09
7.3.50.0120.00314.96
7.3.40.0040.00714.79
7.3.30.0000.00914.95
7.3.20.0120.00316.85
7.3.10.0120.00316.85
7.3.00.0090.00316.72
7.2.330.0140.00316.90
7.2.320.0100.01016.86
7.2.310.0160.00616.76
7.2.300.0090.00916.93
7.2.290.0100.01116.87
7.2.240.0140.00315.08
7.2.230.0060.00915.47
7.2.220.0030.01015.44
7.2.210.0070.00715.30
7.2.200.0070.00715.48
7.2.190.0030.00915.31
7.2.180.0100.00315.32
7.2.170.0070.00715.13
7.2.160.0070.00715.18
7.2.150.0070.01017.20
7.2.140.0060.00617.01
7.2.130.0060.00916.99
7.2.120.0050.00717.02
7.2.110.0060.00617.16
7.2.100.0000.01317.12
7.2.90.0030.01017.32
7.2.80.0050.00817.07
7.2.70.0080.00917.08
7.2.60.0070.00617.11
7.2.50.0100.00417.25
7.2.40.0030.01217.21
7.2.30.0050.00717.07
7.2.20.0050.01316.89
7.2.10.0060.00817.19
7.2.00.0040.00917.93
7.1.330.0100.00316.07
7.1.320.0030.01316.03
7.1.310.0060.00916.07
7.1.300.0090.00616.08
7.1.290.0070.00315.97
7.1.280.0070.00416.10
7.1.270.0060.00715.93
7.1.260.0030.01315.86
7.1.250.0060.00815.92
7.1.100.0000.01418.70
7.1.70.0080.00417.39
7.1.60.0100.01019.82
7.1.50.0030.00817.15
7.1.00.0030.07722.33
7.0.200.0070.00316.61
7.0.140.0070.07021.92
7.0.100.0270.04320.05
7.0.90.0100.07719.87
7.0.80.0200.07319.95
7.0.70.0100.08319.92
7.0.60.0070.04319.94
7.0.50.0070.05320.34
7.0.40.0070.08719.99
7.0.30.0230.03320.11
7.0.20.0170.04720.04
7.0.10.0070.10020.11
7.0.00.0070.08320.13
5.6.280.0000.07721.14
5.6.250.0100.07720.56
5.6.240.0130.08020.59
5.6.230.0100.08320.65
5.6.220.0100.04720.62
5.6.210.0070.07720.59
5.6.200.0100.07720.96
5.6.190.0270.06721.08
5.6.180.0100.05320.96
5.6.170.0100.07021.17
5.6.160.0070.04720.96
5.6.150.0030.07721.18
5.6.140.0170.07320.95
5.6.130.0070.08321.06
5.6.120.0130.08021.07
5.6.110.0130.07321.02
5.6.100.0130.08021.01
5.6.90.0170.06320.93
5.6.80.0170.07020.40
5.6.70.0130.07020.49
5.6.60.0070.05720.40
5.6.50.0030.08720.52
5.6.40.0070.08020.49
5.6.30.0170.06720.38
5.6.20.0170.08020.27
5.6.10.0100.06020.38
5.6.00.0100.07320.30
5.5.380.0100.06020.50
5.5.370.0200.03720.47
5.5.360.0030.04720.30
5.5.350.0070.07020.30
5.5.340.0170.03720.81
5.5.330.0000.08720.76
5.5.320.0070.08720.90
5.5.310.0130.05720.88
5.5.300.0070.08320.91
5.5.290.0070.07720.87
5.5.280.0130.07720.89
5.5.270.0070.07720.75
5.5.260.0030.06320.75
5.5.250.0070.08020.74
5.5.240.0130.07020.02
5.5.230.0030.06320.28
5.5.220.0130.07720.25
5.5.210.0030.07020.29
5.5.200.0130.08020.29
5.5.190.0070.03720.13
5.5.180.0030.04720.09
5.5.160.0070.08320.22
5.5.150.0130.06720.22
5.5.140.0030.07020.18
5.5.130.0070.05720.28
5.5.120.0100.07020.25
5.5.110.0000.06320.12
5.5.100.0100.04020.18
5.5.90.0100.03320.09
5.5.80.0070.03719.91
5.5.70.0070.04019.97
5.5.60.0000.04320.10
5.5.50.0100.05019.96
5.5.40.0070.03720.14
5.5.30.0070.04019.96
5.5.20.0130.03020.14
5.5.10.0130.06320.04
5.5.00.0100.04319.96
5.4.450.0270.06019.46
5.4.440.0230.06719.54
5.4.430.0100.06719.34
5.4.420.0130.07019.46
5.4.410.0130.07719.30
5.4.400.0030.07719.20
5.4.390.0130.07019.11
5.4.380.0170.07018.89
5.4.370.0130.04719.03
5.4.360.0100.07318.97
5.4.350.0200.07019.05
5.4.340.0100.06018.89
5.4.320.0030.08318.95
5.4.310.0000.04318.94
5.4.300.0170.06019.04
5.4.290.0130.06319.11
5.4.280.0130.06019.06
5.4.270.0030.04319.11
5.4.260.0100.04019.22
5.4.250.0030.04018.93
5.4.240.0100.04718.80
5.4.230.0030.04019.08
5.4.220.0030.04018.80
5.4.210.0000.04019.08
5.4.200.0100.04018.88
5.4.190.0030.03719.03
5.4.180.0030.06019.03
5.4.170.0030.04019.08
5.4.160.0070.03319.09
5.4.150.0030.07318.95
5.4.140.0030.04316.29
5.4.130.0100.06716.21
5.4.120.0000.06716.21
5.4.110.0100.07016.22
5.4.100.0000.08016.31
5.4.90.0030.08316.25
5.4.80.0100.03016.21
5.4.70.0100.07316.25
5.4.60.0070.04016.33
5.4.50.0030.07016.32
5.4.40.0000.03716.25
5.4.30.0000.07716.32
5.4.20.0000.07316.23
5.4.10.0070.07316.20
5.4.00.0070.06315.73
5.3.290.0070.06715.57
5.3.280.0030.04715.57
5.3.270.0070.04015.57
5.3.260.0100.04315.57
5.3.250.0030.04015.57
5.3.240.0130.07015.57
5.3.230.0070.06715.57
5.3.220.0070.07715.57
5.3.210.0070.06715.57
5.3.200.0070.06015.57
5.3.190.0100.05715.57
5.3.180.0100.04715.57
5.3.170.0030.07715.57
5.3.160.0130.07315.57
5.3.150.0000.04015.57
5.3.140.0070.03315.57
5.3.130.0100.07315.57
5.3.120.0170.06715.57
5.3.110.0100.07715.57
5.3.100.0070.07715.57
5.3.90.0030.07315.57
5.3.80.0100.07015.57
5.3.70.0030.03315.57
5.3.60.0070.07715.57
5.3.50.0100.06015.57
5.3.40.0070.04715.57
5.3.30.0100.05015.57
5.3.20.0030.07315.57
5.3.10.0070.05015.57
5.3.00.0030.07315.57
5.2.170.0030.05015.57
5.2.160.0070.05715.57
5.2.150.0000.03315.57
5.2.140.0070.06315.57
5.2.130.0130.04315.57
5.2.120.0070.05315.57
5.2.110.0030.04715.57
5.2.100.0070.05715.57
5.2.90.0030.06015.57
5.2.80.0100.06015.57
5.2.70.0000.06315.57
5.2.60.0100.05315.57
5.2.50.0070.06315.57
5.2.40.0030.04715.57
5.2.30.0070.06315.57
5.2.20.0030.05315.57
5.2.10.0070.03315.57
5.2.00.0030.05315.57
5.1.60.0070.02015.57
5.1.50.0100.05015.57
5.1.40.0030.02315.57
5.1.30.0130.03715.57
5.1.20.0070.05315.57
5.1.10.0070.03715.57
5.1.00.0030.05315.57
5.0.50.0070.02015.57
5.0.40.0030.03315.57
5.0.30.0000.05015.57
5.0.20.0030.03015.57
5.0.10.0000.03715.57
5.0.00.0030.06715.57
4.4.90.0070.02715.57
4.4.80.0000.03315.57
4.4.70.0000.03715.57
4.4.60.0000.02715.57
4.4.50.0000.02715.57
4.4.40.0030.05015.57
4.4.30.0000.03315.57
4.4.20.0030.03015.57
4.4.10.0130.01715.57
4.4.00.0000.02715.57
4.3.110.0000.03315.57
4.3.100.0000.03715.57
4.3.90.0000.03315.57
4.3.80.0030.04015.57
4.3.70.0030.03015.57
4.3.60.0000.02715.57
4.3.50.0000.02715.57
4.3.40.0130.04315.57
4.3.30.0070.03015.57
4.3.20.0000.03715.57
4.3.10.0000.03315.57
4.3.00.0030.03315.57

preferences:
54.78 ms | 400 KiB | 5 Q