3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getCURL($url){ $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); return response; } class CSVParser { private $fsArrayColNames; private $fsArrayExtraCols; private $faArrayRecords; private $faArrayExtraRecords; public function getColTitles($includeExtra, &$colCount) { $result[] = $fsArrayColNames; $colCount = count($fsArrayColNames); if ($includeExtra){ array_merge($result,$fsArrayExtraCols); $colCount = $colCount + count($fsArrayExtraCols); } return result; } public function addExtraCols($namesArray){ array_merge($fsArrayExtraCols,$namesArray); $extraCount = count($namesArray); $cnt = count($faArrayExtraRecords); $append = array_fill(0,$cnt,""); for ($i0 = 0; $i0 < $cnt; ++$i0) { array_merge($faArrayExtraRecords[$i0],$append); } } public function getRowCount() { return count($faArrayRecords); } public function getOrSetValue($recordID, $col, $value, $isExtra, $isSet){ if ($isExtra){ if ($isSet) { $faArrayExtraRecords[$recordID][$col]=$value; } else { return $faArrayExtraRecords[$recordID][$col]; } } else { if ($isSet) { $faArrayRecords[$recordID][$col]=$value; } else { return $faArrayRecords[$recordID][$col]; } } } public function parseCSV($source){ $lines = explode($source,"\n"); $once = false; $count = 0; foreach($lines as $line) { $lineArray = explode($line,","); if (once) { array_merge( $faArrayRecords[$count], $lineArray ); } else { $fsArrayColNames = $lineArray; $once = true; } $count = $count++; } } public function parseFromURL($url) { return $this->parseCSV(getCURL($url)); } } $p = new CSVParser(); $url="http://pastebin.com/raw.php?i=vu81DjnS"; $p->parseFromURL($url);

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.0190.00316.61
8.3.50.0080.01221.99
8.3.40.0110.00418.82
8.3.30.0120.00318.79
8.3.20.0040.00420.16
8.3.10.0000.00823.65
8.3.00.0080.00019.38
8.2.180.0090.00616.38
8.2.170.0140.00722.96
8.2.160.0100.00320.38
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0100.00017.63
8.2.120.0040.00426.35
8.2.110.0030.00621.02
8.2.100.0080.00419.58
8.2.90.0090.00319.12
8.2.80.0000.00917.97
8.2.70.0040.00418.04
8.2.60.0000.00817.90
8.2.50.0060.00318.10
8.2.40.0000.00820.39
8.2.30.0040.00420.56
8.2.20.0000.01017.62
8.2.10.0040.00418.10
8.2.00.0050.00318.00
8.1.280.0100.01025.92
8.1.270.0080.00423.98
8.1.260.0080.00028.09
8.1.250.0050.00328.09
8.1.240.0000.00922.75
8.1.230.0040.01120.78
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0080.00017.22
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0060.00318.49
8.1.160.0000.00921.96
8.1.150.0040.00418.78
8.1.140.0040.00419.41
8.1.130.0030.00317.57
8.1.120.0040.00417.33
8.1.110.0000.00717.44
8.1.100.0080.00017.38
8.1.90.0000.00717.32
8.1.80.0000.00817.45
8.1.70.0050.00317.38
8.1.60.0040.00417.64
8.1.50.0030.00617.59
8.1.40.0080.00317.58
8.1.30.0100.00317.56
8.1.20.0060.00317.69
8.1.10.0040.00417.62
8.1.00.0040.00417.41
8.0.300.0080.00019.63
8.0.290.0060.00316.75
8.0.280.0030.00318.41
8.0.270.0030.00317.16
8.0.260.0040.00417.22
8.0.250.0030.00316.95
8.0.240.0000.00717.00
8.0.230.0070.00017.04
8.0.220.0000.00716.93
8.0.210.0040.00416.85
8.0.200.0000.00616.85
8.0.190.0030.00516.89
8.0.180.0080.00016.96
8.0.170.0040.00416.99
8.0.160.0000.00816.83
8.0.150.0000.00716.84
8.0.140.0060.00316.91
8.0.130.0060.00013.37
8.0.120.0050.00316.91
8.0.110.0040.00416.77
8.0.100.0000.00817.01
8.0.90.0000.00816.87
8.0.80.0090.00616.93
8.0.70.0030.00516.84
8.0.60.0000.00717.02
8.0.50.0030.00516.95
8.0.30.0090.00917.13
8.0.20.0110.00717.40
8.0.10.0000.00716.98
8.0.00.0100.00816.81
7.4.330.0060.00016.71
7.4.320.0030.00316.50
7.4.300.0070.00016.67
7.4.290.0030.00316.63
7.4.280.0000.00716.54
7.4.270.0040.00416.52
7.4.260.0050.00316.50
7.4.250.0080.00016.60
7.4.240.0020.00516.53
7.4.230.0070.00016.66
7.4.220.0100.00516.50
7.4.210.0060.00816.57
7.4.200.0000.00716.71
7.4.160.0110.00416.57
7.4.150.0100.00717.40
7.4.140.0080.01117.86
7.4.130.0100.00916.42
7.4.120.0080.01016.48
7.4.110.0060.01316.57
7.4.100.0150.00616.37
7.4.90.0110.00716.67
7.4.80.0090.00919.39
7.4.70.0060.01116.73
7.4.60.0100.00616.50
7.4.50.0070.01016.57
7.4.40.0060.01016.42
7.4.30.0030.01916.66
7.4.10.0080.01115.00
7.4.00.0050.01215.01
7.3.330.0000.00613.22
7.3.320.0000.00613.18
7.3.310.0050.00216.43
7.3.300.0070.00016.38
7.3.290.0070.00716.37
7.3.280.0070.01216.38
7.3.270.0170.00017.40
7.3.260.0030.01416.43
7.3.250.0110.00616.35
7.3.240.0060.00916.45
7.3.230.0110.00616.52
7.3.210.0100.00716.53
7.3.200.0030.01316.25
7.3.190.0150.00316.65
7.3.180.0060.01016.56
7.3.170.0140.00716.27
7.3.160.0100.00716.37
7.3.130.0090.00914.80
7.3.120.0070.01014.63
7.3.110.0070.01015.06
7.3.100.0120.00015.10
7.3.90.0040.00814.80
7.3.80.0080.00414.83
7.3.70.0070.00314.91
7.3.60.0070.00714.91
7.3.50.0000.00914.89
7.3.40.0070.00714.61
7.3.30.0100.00314.63
7.3.20.0030.01216.69
7.3.10.0040.00816.70
7.3.00.0000.01116.74
7.2.330.0150.00316.70
7.2.320.0190.00016.43
7.2.310.0170.00716.81
7.2.300.0140.00916.32
7.2.290.0060.00916.54
7.2.260.0030.01314.89
7.2.250.0030.01415.17
7.2.240.0070.01015.14
7.2.230.0030.00714.96
7.2.220.0100.00015.14
7.2.210.0070.01015.24
7.2.200.0030.00914.73
7.2.190.0030.01315.02
7.2.180.0100.00314.89
7.2.170.0060.00915.04
7.2.160.0030.00814.74
7.2.150.0110.00916.76
7.2.140.0040.01416.76
7.2.130.0040.00816.80
7.2.120.0060.00916.65
7.2.110.0060.01016.73
7.2.100.0070.00716.65
7.2.90.0030.01116.61
7.2.80.0090.00316.89
7.2.70.0040.01116.61
7.2.60.0110.00316.71
7.2.50.0070.00716.66
7.2.40.0030.01116.73
7.2.30.0000.01816.96
7.2.20.0060.01216.55
7.2.10.0030.01316.75
7.2.00.0070.00617.78
7.1.330.0040.01115.54
7.1.320.0000.01315.71
7.1.310.0100.00315.62
7.1.300.0070.00715.32
7.1.290.0030.00715.66
7.1.280.0060.00615.55
7.1.270.0100.01015.75
7.1.260.0100.00715.72
7.1.250.0030.01015.80
7.1.240.0090.00615.71
7.1.230.0070.00315.75
7.1.220.0070.00315.84
7.1.210.0030.01015.66
7.1.200.0100.00615.82
7.1.190.0070.00315.49
7.1.180.0070.00715.69
7.1.170.0070.00715.88
7.1.160.0040.01115.76
7.1.150.0070.01015.50
7.1.140.0120.00315.69
7.1.130.0070.01015.58
7.1.120.0030.01015.51
7.1.110.0040.00715.82
7.1.100.0070.00716.79
7.1.90.0080.00415.38
7.1.80.0000.01215.69
7.1.70.0020.00816.24
7.1.60.0080.01017.56
7.1.50.0050.01216.24
7.1.40.0070.00715.45
7.1.30.0000.00915.69
7.1.20.0030.00915.71
7.1.10.0080.00815.86
7.1.00.0080.03818.92
7.0.330.0070.00715.16
7.0.320.0090.00315.29
7.0.310.0000.01715.36
7.0.300.0000.01415.43
7.0.290.0070.00715.22
7.0.280.0170.00014.98
7.0.270.0090.00615.04
7.0.260.0060.00615.07
7.0.250.0090.00615.41
7.0.240.0000.01615.52
7.0.230.0040.01115.41
7.0.220.0050.00515.12
7.0.210.0100.00315.36
7.0.200.0140.00414.85
7.0.190.0070.01015.25
7.0.180.0030.00615.36
7.0.170.0090.00915.40
7.0.160.0030.01615.24
7.0.150.0070.01015.46
7.0.140.0100.00715.19
7.0.130.0090.00915.44
7.0.120.0070.01115.20
7.0.110.0040.01215.48
7.0.100.0030.01015.13
7.0.90.0110.00615.28
7.0.80.0100.00715.43
7.0.70.0030.00615.30
7.0.60.0040.04317.59
7.0.50.0060.04516.68
7.0.40.0060.02516.74
7.0.30.0220.02816.77
7.0.20.0170.04516.72
7.0.10.0040.02716.77
7.0.00.0100.04016.82
5.6.400.0080.01114.08
5.6.390.0060.01014.24
5.6.380.0060.00914.34
5.6.370.0060.00314.31
5.6.360.0110.00414.53
5.6.350.0130.00314.37
5.6.340.0080.00814.06
5.6.330.0070.01014.22
5.6.320.0060.01114.35
5.6.310.0130.00314.39
5.6.300.0100.01314.67
5.6.290.0100.00714.32
5.6.280.0100.03317.65
5.6.270.0080.00314.16
5.6.260.0040.01113.98
5.6.250.0110.00714.49
5.6.240.0070.01114.42
5.6.230.0040.00714.13
5.6.220.0090.00614.13
5.6.210.0070.04117.33
5.6.200.0050.03216.23
5.6.190.0060.02317.41
5.6.180.0190.02617.52
5.6.170.0150.04417.47
5.6.160.0050.04817.24
5.6.150.0070.02716.14
5.6.140.0020.02416.22
5.6.130.0110.04316.40
5.6.120.0130.03817.56
5.6.110.0020.04717.68
5.6.100.0100.04217.60
5.6.90.0050.04817.78
5.6.80.0030.03417.28
5.6.70.0000.00914.20
5.6.60.0030.01014.01
5.6.50.0000.01414.39
5.6.40.0050.00314.19
5.6.30.0040.00714.26
5.6.20.0040.00814.21
5.6.10.0050.00314.29
5.6.00.0000.01414.36
5.5.380.0030.01013.92
5.5.370.0070.00714.19
5.5.360.0060.00614.11
5.5.350.2180.02517.43
5.5.340.0080.04216.07
5.5.330.0100.04517.33
5.5.320.0100.04017.30
5.5.310.0150.02317.08
5.5.300.0040.04316.09
5.5.290.0070.04315.97
5.5.280.0080.04717.33
5.5.270.0090.04717.40
5.5.260.0050.03617.46
5.5.250.0110.04217.37
5.5.240.0230.03017.10
5.5.230.0060.00614.06
5.5.220.0030.00714.11
5.5.210.0040.00413.72
5.5.200.0000.00813.90
5.5.190.0000.01213.95
5.5.180.0100.00313.69
5.5.170.0100.00313.79
5.5.160.0030.00713.97
5.5.150.0030.01013.98
5.5.140.0060.00614.23
5.5.130.0080.00414.09
5.5.120.0040.01113.93
5.5.110.0030.00914.04
5.5.100.0050.00313.94
5.5.90.0080.00014.34
5.5.80.0040.00713.96
5.5.70.0030.01013.62
5.5.60.0060.00913.68
5.5.50.0110.00013.93
5.5.40.0060.00613.74
5.5.30.0030.00714.18
5.5.20.0080.00013.71
5.5.10.0030.00913.87
5.5.00.0000.00913.78

preferences:
51.56 ms | 401 KiB | 5 Q