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); 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.70.0140.00717.00
8.3.60.0150.00618.27
8.3.50.0100.00722.11
8.3.40.0120.00318.83
8.3.30.0160.00619.04
8.3.20.0090.00018.98
8.3.10.0050.00321.09
8.3.00.0080.00021.72
8.2.180.0120.00316.63
8.2.170.0160.00322.96
8.2.160.0030.01020.43
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0070.00319.38
8.2.110.0100.00321.12
8.2.100.0080.00418.03
8.2.90.0140.00317.63
8.2.80.0040.00417.97
8.2.70.0040.00418.05
8.2.60.0040.00418.22
8.2.50.0040.00418.10
8.2.40.0030.00521.32
8.2.30.0000.00719.38
8.2.20.0000.00717.96
8.2.10.0050.00317.87
8.2.00.0060.00617.80
8.1.280.0040.01125.92
8.1.270.0050.00323.99
8.1.260.0040.01426.35
8.1.250.0040.00428.09
8.1.240.0060.00617.73
8.1.230.0040.00717.83
8.1.220.0000.00917.74
8.1.210.0000.00818.77
8.1.200.0030.00617.24
8.1.190.0040.00417.48
8.1.180.0030.00718.10
8.1.170.0000.00818.75
8.1.160.0000.00718.99
8.1.150.0000.00818.82
8.1.140.0000.00717.61
8.1.130.0030.00317.88
8.1.120.0070.00017.61
8.1.110.0050.00217.53
8.1.100.0070.00017.65
8.1.90.0040.00417.67
8.1.80.0050.00317.59
8.1.70.0030.00317.59
8.1.60.0000.00917.71
8.1.50.0030.00617.70
8.1.40.0000.00717.75
8.1.30.0050.00317.79
8.1.20.0030.00617.87
8.1.10.0080.00017.75
8.1.00.0100.00017.74
8.0.300.0040.00418.77
8.0.290.0080.00017.00
8.0.280.0040.00418.55
8.0.270.0030.00517.37
8.0.260.0030.00316.93
8.0.250.0000.00817.20
8.0.240.0040.00417.11
8.0.230.0040.00417.07
8.0.220.0030.00316.96
8.0.210.0000.00717.11
8.0.200.0030.00317.09
8.0.190.0040.00417.23
8.0.180.0070.00017.02
8.0.170.0050.00217.14
8.0.160.0040.00417.17
8.0.150.0070.00017.10
8.0.140.0030.00517.13
8.0.130.0000.00613.54
8.0.120.0030.00516.98
8.0.110.0030.00616.98
8.0.100.0080.00017.14
8.0.90.0080.00016.95
8.0.80.0000.01517.09
8.0.70.0040.00417.22
8.0.60.0030.00517.12
8.0.50.0000.00816.91
8.0.30.0090.00917.21
8.0.20.0140.00517.40
8.0.10.0040.00417.07
8.0.00.0120.00617.11
7.4.330.0050.00016.79
7.4.320.0000.00616.81
7.4.300.0000.00716.73
7.4.290.0050.00316.83
7.4.280.0040.00416.83
7.4.270.0030.00416.77
7.4.260.0060.00013.47
7.4.250.0000.00716.76
7.4.240.0040.00416.75
7.4.230.0000.00716.72
7.4.220.0130.00716.89
7.4.210.0050.01016.88
7.4.200.0000.00716.56
7.4.190.0040.00316.91
7.4.160.0080.00816.63
7.4.150.0070.01117.40
7.4.140.0110.00917.86
7.4.130.0080.01116.68
7.4.120.0060.01216.66
7.4.110.0030.01716.91
7.4.100.0040.01516.64
7.4.90.0070.01016.70
7.4.80.0110.01319.39
7.4.70.0160.00016.83
7.4.60.0090.00916.70
7.4.50.0050.00316.89
7.4.40.0030.01022.77
7.4.30.0070.01116.79
7.4.10.0090.00914.98
7.4.00.0050.01015.22
7.3.330.0000.00513.43
7.3.320.0000.00513.34
7.3.310.0000.00716.67
7.3.300.0070.00016.55
7.3.290.0110.00316.48
7.3.280.0100.00716.51
7.3.270.0170.00317.40
7.3.260.0120.00718.24
7.3.250.0080.00916.62
7.3.240.0060.01116.46
7.3.230.0100.00716.82
7.3.210.0140.00416.79
7.3.200.0110.00719.39
7.3.190.0090.01216.71
7.3.180.0100.00716.56
7.3.170.0130.00316.84
7.3.160.0090.00916.63
7.3.130.0040.01415.05
7.3.120.0110.00614.94
7.3.110.0030.01415.25
7.3.100.0030.01115.05
7.3.90.0040.01514.88
7.3.80.0000.01315.23
7.3.70.0000.01415.23
7.3.60.0100.00615.14
7.3.50.0060.01215.15
7.3.40.0070.00715.02
7.3.30.0040.01114.92
7.3.20.0140.00016.82
7.3.10.0090.00716.81
7.3.00.0070.00416.79
7.2.330.0000.01816.93
7.2.320.0120.00616.89
7.2.310.0080.01116.93
7.2.300.0200.00316.75
7.2.290.0070.01417.03
7.2.260.0080.01215.00
7.2.250.0090.00615.35
7.2.240.0070.00715.30
7.2.230.0070.00715.30
7.2.220.0080.00515.51
7.2.210.0130.00315.25
7.2.200.0030.00615.49
7.2.190.0120.00615.13
7.2.180.0090.00915.08
7.2.170.0070.00715.32
7.2.160.0080.00815.08
7.2.150.0040.01217.13
7.2.140.0080.01217.03
7.2.130.0090.00417.08
7.2.120.0050.00717.14
7.2.110.0090.00417.08
7.2.100.0080.00617.08
7.2.90.0070.00717.18
7.2.80.0050.00817.13
7.2.70.0050.00916.90
7.2.60.0090.00317.02
7.2.50.0040.00917.10
7.2.40.0090.00417.36
7.2.30.0050.00817.13
7.2.20.0080.00717.18
7.2.10.0060.00917.20
7.2.00.0020.01117.88
7.1.330.0000.01016.05
7.1.320.0000.01216.12
7.1.310.0000.01316.19
7.1.300.0170.00015.61
7.1.290.0070.01115.64
7.1.280.0060.00316.11
7.1.270.0060.01015.84
7.1.260.0000.01515.98
7.1.250.0090.00615.79
7.1.240.0070.01015.88
7.1.230.0070.00715.78
7.1.220.0060.00915.76
7.1.210.0120.00316.04
7.1.200.0000.01415.92
7.1.190.0070.00316.00
7.1.180.0080.00816.05
7.1.170.0040.00416.08
7.1.160.0040.00716.14
7.1.150.0060.00316.17
7.1.140.0070.00716.03
7.1.130.0040.01215.98
7.1.120.0000.01716.16
7.1.110.0080.00815.73
7.1.100.0240.00517.16
7.1.90.0030.00915.94
7.1.80.0070.00716.09
7.1.70.0030.00516.76
7.1.60.0080.01017.58
7.1.50.0100.01016.50
7.1.40.0040.01116.14
7.1.30.0030.01215.88
7.1.20.0040.01116.00
7.1.10.0070.00315.97
7.1.00.0050.03019.29
7.0.330.0000.01415.80
7.0.320.0070.00715.67
7.0.310.0000.01215.73
7.0.300.0030.00615.75
7.0.290.0040.00815.77
7.0.280.0070.01015.47
7.0.270.0060.00615.46
7.0.260.0060.00915.82
7.0.250.0000.01115.62
7.0.240.0040.01115.50
7.0.230.0040.00715.82
7.0.220.0030.00915.51
7.0.210.0030.01015.55
7.0.200.0060.00316.15
7.0.190.0110.00415.70
7.0.180.0090.00615.75
7.0.170.0060.00915.74
7.0.160.0040.01415.70
7.0.150.0040.00815.78
7.0.140.0060.03818.79
7.0.130.0060.00915.67
7.0.120.0030.01415.63
7.0.110.0130.03617.73
7.0.100.0250.03217.80
7.0.90.0350.03217.89
7.0.80.0360.03417.81
7.0.70.0080.03917.90
7.0.60.0090.03317.83
7.0.50.0030.02517.69
7.0.40.0030.02616.84
7.0.30.0070.02716.57
7.0.20.0020.02916.63
7.0.10.0070.03716.78
7.0.00.0130.02816.59
5.6.400.0070.01014.80
5.6.390.0080.00314.71
5.6.380.0070.00714.57
5.6.370.0070.00414.76
5.6.360.0040.00914.77
5.6.350.0150.00014.78
5.6.340.0030.00614.73
5.6.330.0030.00614.48
5.6.320.0000.01214.82
5.6.310.0040.01114.59
5.6.300.0100.00614.54
5.6.290.0090.00614.38
5.6.280.0050.04217.91
5.6.270.0060.00614.84
5.6.260.0060.02717.61
5.6.250.0100.03117.53
5.6.240.0120.03117.61
5.6.230.0080.03917.72
5.6.220.0030.03117.70
5.6.210.0130.03617.55
5.6.200.0100.04517.68
5.6.190.0100.03917.72
5.6.180.0130.04017.56
5.6.170.0030.03917.59
5.6.160.0050.03817.64
5.6.150.0070.04517.65
5.6.140.0020.03617.65
5.6.130.0100.03317.52
5.6.120.0060.02517.50
5.6.110.0070.02517.57
5.6.100.0050.03217.62
5.6.90.0100.02617.51
5.6.80.0070.04017.26
5.6.70.0090.02017.22
5.6.60.0070.04217.30
5.6.50.0100.02517.47
5.6.40.0090.03517.31
5.6.30.0050.02617.25
5.6.20.0090.02017.07
5.6.10.0090.02017.38
5.6.00.0030.02317.18
5.5.380.0040.03516.07
5.5.370.0070.04515.93
5.5.360.0050.04516.14
5.5.350.0060.04315.99
5.5.340.0130.03816.32
5.5.330.0070.03316.16
5.5.320.0070.04716.09
5.5.310.0100.02716.36
5.5.300.0050.02616.42
5.5.290.0060.03716.20
5.5.280.0080.02816.04
5.5.270.0090.03316.41
5.5.260.0070.03616.04
5.5.250.0110.02116.17
5.5.240.0090.04216.13
5.5.230.0020.02615.71
5.5.220.0110.02515.94
5.5.210.0080.02615.82
5.5.200.0120.03715.93
5.5.190.0060.02116.10
5.5.180.0060.02315.83
5.5.170.0030.01414.43
5.5.160.0050.02016.01
5.5.150.0030.02615.95
5.5.140.0120.02015.93
5.5.130.0030.02515.88
5.5.120.0080.03515.82
5.5.110.0080.01816.03
5.5.100.0000.02515.81
5.5.90.0020.02415.91
5.5.80.0060.02915.83
5.5.70.0030.03215.81
5.5.60.0080.03215.94
5.5.50.0070.02316.00
5.5.40.0080.04315.69
5.5.30.0020.02515.88
5.5.20.0090.02015.88
5.5.10.0070.02315.89
5.5.00.0050.04215.64
5.4.450.0100.02015.54
5.4.440.0050.02815.70
5.4.430.0090.03215.60
5.4.420.0040.02415.62
5.4.410.0030.02415.52
5.4.400.0090.02515.41
5.4.390.0050.04115.41
5.4.380.0020.02815.39
5.4.370.0060.01715.41
5.4.360.0050.04015.54
5.4.350.0000.03615.46
5.4.340.0080.01815.38
5.4.330.0080.00411.81
5.4.320.0070.02215.46
5.4.310.0060.02315.42
5.4.300.0010.02315.39
5.4.290.0000.02515.45
5.4.280.0060.02315.40
5.4.270.0050.02015.46
5.4.260.0080.02115.53
5.4.250.0080.01815.42
5.4.240.0070.03015.40
5.4.230.0070.03015.47
5.4.220.0050.04215.38
5.4.210.0050.03315.38
5.4.200.0060.03015.38
5.4.190.0030.04015.49
5.4.180.0120.02815.46
5.4.170.0030.03915.37
5.4.160.0050.02615.47
5.4.150.0080.02015.39
5.4.140.0050.03514.15
5.4.130.0030.02114.13
5.4.120.0040.01914.01
5.4.110.0060.02914.11
5.4.100.0090.02714.17
5.4.90.0000.02214.00
5.4.80.0070.03214.13
5.4.70.0050.03014.15
5.4.60.0060.03814.04
5.4.50.0060.01814.14
5.4.40.0020.02314.17
5.4.30.0050.01814.01
5.4.20.0070.03914.14
5.4.10.0040.02614.13
5.4.00.0090.02413.86
5.3.290.0030.03713.28
5.3.280.0040.03013.24
5.3.270.0060.02113.17
5.3.260.0020.03613.16
5.3.250.0040.02413.19
5.3.240.0050.02813.15
5.3.230.0050.03513.26
5.3.220.0070.01813.17
5.3.210.0060.01813.20
5.3.200.0030.02113.17
5.3.190.0030.02113.23
5.3.180.0080.03013.17
5.3.170.0020.02413.20
5.3.160.0090.01713.09
5.3.150.0020.02013.23
5.3.140.0080.01813.22
5.3.130.0050.04113.09
5.3.120.0030.03313.14
5.3.110.0050.03213.08
5.3.100.0060.01912.98
5.3.90.0070.01712.92
5.3.80.0040.02212.89
5.3.70.0030.02312.89
5.3.60.0060.01912.95
5.3.50.0080.02112.86
5.3.40.0010.02212.80
5.3.30.0050.01912.83
5.3.20.0070.01912.73
5.3.10.0030.02012.66
5.3.00.0020.02812.68
5.2.170.0000.02711.91
5.2.160.0000.03311.91
5.2.150.0000.02711.91
5.2.140.0000.03311.91
5.2.130.0030.03011.91
5.2.120.0030.02711.91
5.2.110.0100.01711.91
5.2.100.0000.03311.91
5.2.90.0000.02711.91
5.2.80.0000.03311.91
5.2.70.0000.02711.91
5.2.60.0070.02011.91
5.2.50.0070.06311.91
5.2.40.0030.03011.91
5.2.30.0030.06011.91
5.2.20.0100.04011.91
5.2.10.0030.06011.91
5.2.00.0030.03011.91
5.1.60.0030.03011.91
5.1.50.0000.02711.91
5.1.40.0000.02311.91
5.1.30.0030.02711.91
5.1.20.0070.02311.91
5.1.10.0030.02311.91
5.1.00.0070.01711.91
5.0.50.0030.02011.91
5.0.40.0000.02711.91
5.0.30.0000.03311.91
5.0.20.0000.02011.91
5.0.10.0030.04011.91
5.0.00.0030.03011.91
4.4.90.0030.02011.91
4.4.80.0030.01711.91
4.4.70.0000.01711.91
4.4.60.0000.01711.91
4.4.50.0100.00711.91
4.4.40.0030.02311.91
4.4.30.0000.01711.91
4.4.20.0000.01311.91
4.4.10.0030.01311.91
4.4.00.0030.02311.91
4.3.110.0030.01311.91
4.3.100.0000.01711.91
4.3.90.0030.01311.91
4.3.80.0000.02011.91
4.3.70.0000.01711.91
4.3.60.0030.01011.91
4.3.50.0000.01311.91
4.3.40.0030.02011.91
4.3.30.0000.01711.91
4.3.20.0000.01711.91
4.3.10.0000.01311.91
4.3.00.0000.01311.91

preferences:
55 ms | 401 KiB | 5 Q