3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Stack Overflow+_)(*&^%$#{}[]<>@!~./=-'; //My string $shuffleTimes = 100; $table = new table($string, $shuffleTimes); class table { function __construct($string, $time) { $out = '<table cellpadding="5">'; $out .= $this->getRow('th', 'Nom., Shuffled String, Lenght'); for ($x = 1; $x <= $time; $x++) { $shuffledStr = str_shuffle($string); //Maybe this causes the problem $shuffledStr_len = mb_strlen($shuffledStr); $out .= $this->getRow('td', $x . ', ' . $shuffledStr . ', ' . $shuffledStr_len); } $out .= '</table>'; echo $out; } public function getRow($tagName, $contents_list) { //Variables: $out = ''; $contents_array = explode(', ', $contents_list); $contents_number = count($contents_array); $start_tag = '<' . $tagName . '>'; $end_tag = '</' . $tagName . '>'; // Build $out .= '<tr>'; for ($i = 0; $i < $contents_number; $i++) { $out .= $start_tag . $contents_array[$i] . $end_tag; } $out .= '</tr>'; return $out; } }

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)
7.3.10.0100.00016.63
7.3.00.0040.00416.92
7.2.130.0130.00317.11
7.2.120.0030.00716.97
7.2.110.0040.01117.04
7.2.100.0090.00616.79
7.2.90.0040.00816.96
7.2.80.0030.01317.03
7.2.70.0070.00316.97
7.2.60.0030.00617.08
7.2.50.0040.01116.99
7.2.40.0060.00917.18
7.2.30.0080.00417.18
7.2.20.0070.00717.06
7.2.10.0030.01016.84
7.2.00.0100.00617.03
7.1.250.0060.01015.59
7.1.70.0080.00517.24
7.1.60.0120.01219.32
7.1.50.0040.01816.91
7.1.00.0030.07722.44
7.0.200.0000.00816.97
7.0.140.0000.07722.12
7.0.100.0100.05019.92
7.0.90.0270.07720.10
7.0.80.0170.07720.05
7.0.70.0070.04720.02
7.0.60.0230.08320.00
7.0.50.0170.08320.39
7.0.40.0130.07720.11
7.0.30.0130.08020.09
7.0.20.0070.09020.03
7.0.10.0170.07720.04
7.0.00.0030.07720.04
5.6.280.0100.07021.16
5.6.250.0100.08320.78
5.6.240.0170.07320.64
5.6.230.0030.07720.63
5.6.220.0130.07020.62
5.6.210.0200.07720.44
5.6.200.0030.08321.07
5.6.190.0130.07721.06
5.6.180.0030.08721.03
5.6.170.0170.07321.02
5.6.160.0100.07021.04
5.6.150.0200.08020.97
5.6.140.0070.09021.07
5.6.130.0100.08321.02
5.6.120.0100.07720.96
5.6.110.0200.07321.01
5.6.100.0100.07721.03
5.6.90.0200.07321.12
5.6.80.0100.08320.47
5.6.70.0130.07320.30
5.6.60.0070.07320.31
5.6.50.0100.08320.44
5.6.40.0270.06720.39
5.6.30.0130.07020.32
5.6.20.0070.07020.32
5.6.10.0100.05720.50
5.6.00.0030.05020.29
5.5.380.0030.09320.43
5.5.370.0070.07720.41
5.5.360.0070.06720.42
5.5.350.0100.09020.39
5.5.340.0130.06020.85
5.5.330.0030.08320.77
5.5.320.0130.07720.77
5.5.310.0130.06320.90
5.5.300.0130.08020.86
5.5.290.0070.08720.84
5.5.280.0170.06720.92
5.5.270.0130.08320.93
5.5.260.0070.08720.79
5.5.250.0070.04720.65
5.5.240.0130.07320.26
5.5.230.0100.07020.25
5.5.220.0100.07720.23
5.5.210.0130.07320.16
5.5.200.0170.07720.17
5.5.190.0070.08020.25
5.5.180.0070.07720.29
5.5.160.0100.07720.27
5.5.150.0070.07320.13
5.5.140.0130.07320.23
5.5.130.0070.08320.08
5.5.120.0030.09320.27
5.5.110.0070.07320.25
5.5.100.0100.05320.06
5.5.90.0130.07720.10
5.5.80.0070.07320.09
5.5.70.0130.06020.09
5.5.60.0130.08020.16
5.5.50.0030.05320.13
5.5.40.0070.07319.96
5.5.30.0070.07720.10
5.5.20.0030.08020.03
5.5.10.0030.08320.03
5.5.00.0100.07320.04
5.4.450.0100.08019.54
5.4.440.0070.08319.57
5.4.430.0030.08719.46
5.4.420.0170.05719.42
5.4.410.0030.07719.25
5.4.400.0030.08019.13
5.4.390.0170.06719.25
5.4.380.0200.06319.04
5.4.370.0170.06719.21
5.4.360.0030.08019.09
5.4.350.0130.07018.90
5.4.340.0070.08019.03
5.4.320.0130.07318.88
5.4.310.0030.06018.95
5.4.300.0070.07719.18
5.4.290.0030.08019.05
5.4.280.0000.07019.09
5.4.270.0070.08019.15
5.4.260.0100.07718.90
5.4.250.0070.06719.02
5.4.240.0170.06319.13
5.4.230.0130.07319.02
5.4.220.0030.08019.11
5.4.210.0170.07019.08
5.4.200.0170.04719.14
5.4.190.0070.07719.11
5.4.180.0100.06719.08
5.4.170.0030.08719.11
5.4.160.0100.07319.07
5.4.150.0130.07018.88
5.4.140.0070.05016.31
5.4.130.0130.04716.38
5.4.120.0030.07716.27
5.4.110.0000.07716.39
5.4.100.0130.07316.47
5.4.90.0100.06716.34
5.4.80.0070.05016.41
5.4.70.0130.07016.41
5.4.60.0030.07316.34
5.4.50.0030.07716.30
5.4.40.0170.06016.37
5.4.30.0070.07316.43
5.4.20.0030.07016.39
5.4.10.0070.08716.45
5.4.00.0030.07715.73
5.3.290.0030.07714.61
5.3.280.0130.07014.67
5.3.270.0170.03714.55
5.3.260.0170.07314.63
5.3.250.0100.07314.59
5.3.240.0030.06314.58
5.3.230.0070.08014.70
5.3.220.0030.06014.56
5.3.210.0100.08014.53
5.3.200.0030.07014.64
5.3.190.0030.08014.70
5.3.180.0070.07714.53
5.3.170.0100.06314.54
5.3.160.0070.07314.53
5.3.150.0070.08014.61
5.3.140.0100.07314.68
5.3.130.0100.07014.63
5.3.120.0000.09014.62
5.3.110.0070.07314.59
5.3.100.0070.07714.02
5.3.90.0170.06014.05
5.3.80.0170.06714.09
5.3.70.0130.07314.17
5.3.60.0070.07313.94
5.3.50.0030.05713.98
5.3.40.0030.04013.97
5.3.30.0030.04013.83
5.3.20.0000.03713.59
5.3.10.0030.03313.76
5.3.00.0070.03013.55
5.2.170.0100.02312.16
5.2.160.0070.02712.16
5.2.150.0030.03012.16
5.2.140.0070.03012.16
5.2.130.0000.03012.16
5.2.120.0000.03012.16
5.2.110.0030.02712.16
5.2.100.0030.03012.16
5.2.90.0000.03012.16
5.2.80.0030.02712.16
5.2.70.0000.03312.16
5.2.60.0030.05712.16
5.2.50.0100.06312.16
5.2.40.0000.03712.16
5.2.30.0000.04712.16
5.2.20.0030.03012.16
5.2.10.0030.02712.16
5.2.00.0000.03012.16
5.1.60.0000.02312.16
5.1.50.0000.03712.16
5.1.40.0000.03312.16
5.1.30.0070.05012.16
5.1.20.0030.02312.16
5.1.10.0030.05312.16
5.1.00.0000.04312.16
5.0.50.0000.03312.16
5.0.40.0000.02012.16
5.0.30.0030.03012.16
5.0.20.0000.02012.16
5.0.10.0030.02312.16
5.0.00.0000.04012.16
4.4.90.0030.01312.16
4.4.80.0070.01712.16
4.4.70.0000.01312.16
4.4.60.0070.00712.16
4.4.50.0000.02012.16
4.4.40.0000.02312.16
4.4.30.0000.03312.16
4.4.20.0000.01312.16
4.4.10.0030.01712.16
4.4.00.0070.02012.16
4.3.110.0000.01712.16
4.3.100.0070.01012.16
4.3.90.0000.03012.16
4.3.80.0000.03012.16
4.3.70.0000.01712.16
4.3.60.0000.01312.16
4.3.50.0030.01312.16
4.3.40.0000.02312.16
4.3.30.0030.01312.16
4.3.20.0030.02312.16
4.3.10.0000.01712.16
4.3.00.0000.01712.16

preferences:
35.68 ms | 400 KiB | 5 Q