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 { public $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; $faArrayRecords = array(); 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); echo $p->fsArrayColNames;

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.0150.00016.63
8.3.50.0070.01418.05
8.3.40.0110.00419.02
8.3.30.0150.00018.84
8.3.20.0020.00520.19
8.3.10.0000.00823.56
8.3.00.0040.00419.50
8.2.180.0070.01418.44
8.2.170.0110.00322.96
8.2.160.0130.00320.47
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0060.00317.63
8.2.120.0040.00426.35
8.2.110.0060.00322.24
8.2.100.0040.00817.91
8.2.90.0000.00819.11
8.2.80.0060.00317.97
8.2.70.0000.00817.63
8.2.60.0030.00617.79
8.2.50.0080.00018.07
8.2.40.0000.00919.36
8.2.30.0000.00820.72
8.2.20.0080.00017.64
8.2.10.0040.00418.10
8.2.00.0000.00818.08
8.1.280.0070.01025.92
8.1.270.0030.00623.96
8.1.260.0080.00028.09
8.1.250.0050.00328.09
8.1.240.0130.00322.48
8.1.230.0060.00617.65
8.1.220.0040.00417.74
8.1.210.0030.00718.77
8.1.200.0050.00517.35
8.1.190.0030.00517.25
8.1.180.0000.00818.10
8.1.170.0080.00018.48
8.1.160.0080.00021.97
8.1.150.0000.00718.77
8.1.140.0050.00319.53
8.1.130.0030.00317.68
8.1.120.0040.00417.43
8.1.110.0040.00417.42
8.1.100.0070.00017.32
8.1.90.0040.00417.36
8.1.80.0050.00217.42
8.1.70.0030.00317.25
8.1.60.0070.00017.57
8.1.50.0050.00317.45
8.1.40.0000.00917.58
8.1.30.0080.00417.59
8.1.20.0040.00417.57
8.1.10.0050.00317.54
8.1.00.0000.00817.55
8.0.300.0080.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.43
8.0.270.0050.00317.18
8.0.260.0000.00617.23
8.0.250.0000.00717.03
8.0.240.0000.00716.93
8.0.230.0060.00316.90
8.0.220.0040.00416.96
8.0.210.0000.00816.93
8.0.200.0030.00316.89
8.0.190.0040.00416.93
8.0.180.0000.00816.89
8.0.170.0050.00316.83
8.0.160.0040.00417.00
8.0.150.0000.00716.78
8.0.140.0050.00216.81
8.0.130.0050.00013.35
8.0.120.0040.00416.84
8.0.110.0070.00016.96
8.0.100.0030.00516.91
8.0.90.0040.00416.72
8.0.80.0040.01116.95
8.0.70.0080.00216.82
8.0.60.0040.00416.78
8.0.50.0020.00516.73
8.0.30.0150.00417.36
8.0.20.0090.01117.40
8.0.10.0040.00417.11
8.0.00.0090.00816.78
7.4.330.0050.00016.73
7.4.320.0030.00316.42
7.4.300.0060.00016.44
7.4.290.0070.00016.56
7.4.280.0080.00016.63
7.4.270.0070.00016.65
7.4.260.0030.00516.51
7.4.250.0000.00816.58
7.4.240.0020.00616.57
7.4.230.0050.00216.63
7.4.220.0100.01616.47
7.4.210.0110.00416.73
7.4.200.0000.00716.55
7.4.160.0060.00916.59
7.4.150.0080.01217.40
7.4.140.0070.01117.86
7.4.130.0090.01116.59
7.4.120.0140.00416.53
7.4.110.0120.00616.39
7.4.100.0110.00716.64
7.4.90.0130.00616.53
7.4.80.0030.01619.39
7.4.70.0070.01016.69
7.4.60.0080.00816.56
7.4.50.0090.00616.49
7.4.40.0170.00016.55
7.4.30.0080.00816.66
7.4.00.0060.01114.81
7.3.330.0020.00213.32
7.3.320.0060.00013.39
7.3.310.0000.00616.43
7.3.300.0000.00716.41
7.3.290.0040.01016.38
7.3.280.0110.00616.43
7.3.270.0030.01417.40
7.3.260.0100.00716.29
7.3.250.0040.01716.49
7.3.240.0110.00816.46
7.3.230.0090.00916.39
7.3.210.0100.00616.49
7.3.200.0090.01216.50
7.3.190.0130.01316.21
7.3.180.0070.01016.46
7.3.170.0000.01716.28
7.3.160.0030.01916.48
7.3.120.0090.00914.83
7.3.110.0100.00714.89
7.3.100.0030.01414.80
7.3.90.0040.00914.96
7.3.80.0040.00914.88
7.3.70.0070.00614.83
7.3.60.0070.00514.74
7.3.50.0030.00814.86
7.3.40.0020.01214.83
7.3.30.0060.00814.73
7.3.20.0080.00816.65
7.3.10.0080.00416.63
7.3.00.0080.00716.75
7.2.330.0150.00316.67
7.2.320.0140.00316.60
7.2.310.0090.00916.61
7.2.300.0090.00916.67
7.2.290.0070.01016.61
7.2.250.0060.01115.21
7.2.240.0080.01014.89
7.2.230.0070.00815.10
7.2.220.0040.00715.00
7.2.210.0050.00714.87
7.2.200.0060.00714.94
7.2.190.0070.00714.95
7.2.180.0090.00814.99
7.2.170.0070.00714.94
7.2.160.0090.00614.98
7.2.150.0030.01016.80
7.2.140.0070.00716.83
7.2.130.0000.01616.73
7.2.120.0070.01016.87
7.2.110.0090.00316.68
7.2.100.0140.00016.78
7.2.90.0090.00916.96
7.2.80.0070.00716.68
7.2.70.0040.01116.90
7.2.60.0040.01216.72
7.2.50.0040.01116.95
7.2.40.0040.00816.98
7.2.30.0060.00916.91
7.2.20.0090.00316.73
7.2.10.0080.00816.84
7.2.00.0030.00818.06
7.1.330.0090.00615.77
7.1.320.0070.00515.64
7.1.310.0040.00815.58
7.1.300.0050.00715.56
7.1.290.0060.00715.77
7.1.280.0040.00715.62
7.1.270.0060.00615.59
7.1.260.0080.00515.54
7.1.250.0080.00615.84
7.1.240.0030.01015.91
7.1.230.0040.01115.63
7.1.220.0040.00715.67
7.1.210.0120.00315.44
7.1.200.0050.00815.70
7.1.190.0030.00615.72
7.1.180.0030.01215.67
7.1.170.0040.01115.82
7.1.160.0030.01015.86
7.1.150.0060.00915.54
7.1.140.0090.00615.70
7.1.130.0030.01015.84
7.1.120.0040.00815.66
7.1.110.0000.01415.79
7.1.100.0030.00616.71
7.1.90.0030.01015.77
7.1.80.0060.00615.65
7.1.70.0030.01016.42
7.1.60.0060.01217.66
7.1.50.0090.00416.31
7.1.40.0070.00715.63
7.1.30.0040.01115.70
7.1.20.0030.01015.48
7.1.10.0130.00015.42
7.1.00.0020.04719.01
7.0.330.0030.00915.20
7.0.320.0100.00015.39
7.0.310.0000.01515.44
7.0.300.0070.00715.06
7.0.290.0000.01315.39
7.0.280.0080.00615.43
7.0.270.0070.00715.36
7.0.260.0000.00915.45
7.0.250.0000.01315.44
7.0.240.0050.00515.53
7.0.230.0000.01315.18
7.0.220.0090.00615.38
7.0.210.0040.00415.52
7.0.200.0190.00715.04
7.0.190.0070.00715.38
7.0.180.0060.00315.05
7.0.170.0090.00315.52
7.0.160.0060.00815.48
7.0.150.0030.00715.39
7.0.140.0030.01015.45
7.0.130.0070.01015.36
7.0.120.0000.01415.43
7.0.110.0070.00315.21
7.0.100.0100.00315.30
7.0.90.0030.00715.42
7.0.80.0060.00915.45
7.0.70.0110.00015.14
7.0.60.0120.02317.73
7.0.50.0090.02016.70
7.0.40.0060.02516.71
7.0.30.0280.02316.79
7.0.20.0200.04016.77
7.0.10.0030.02716.73
7.0.00.0080.03616.87
5.6.400.0060.00614.50
5.6.390.0100.00314.35
5.6.380.0070.00614.39
5.6.370.0000.01414.19
5.6.360.0040.01214.05
5.6.350.0030.00614.52
5.6.340.0030.01314.16
5.6.330.0040.01114.32
5.6.320.0060.00914.34
5.6.310.0040.00814.54
5.6.300.0030.01014.46
5.6.290.0040.01114.27
5.6.280.0050.03717.72
5.6.270.0000.00914.40
5.6.260.0030.01014.17
5.6.250.0060.00914.26
5.6.240.0070.00314.45
5.6.230.0030.00914.33
5.6.220.0130.00314.43
5.6.210.0060.03217.63
5.6.200.0080.04516.33
5.6.190.0050.02517.52
5.6.180.0170.03517.28
5.6.170.0130.04517.37
5.6.160.0070.04317.41
5.6.150.0030.02916.16
5.6.140.0140.01716.23
5.6.130.0080.03516.18
5.6.120.0050.04017.50
5.6.110.0110.03817.73
5.6.100.0030.05017.64
5.6.90.0060.04817.54
5.6.80.0050.04217.29
5.6.70.0080.00814.41
5.6.60.0080.00414.14
5.6.50.0090.00014.24
5.6.40.0030.01014.20
5.6.30.0000.00814.20
5.6.20.0130.00314.01
5.6.10.0040.01114.18
5.6.00.0140.00014.15
5.5.380.0080.00614.38
5.5.370.0030.00714.14
5.5.360.0090.00614.33
5.5.350.0480.02017.38
5.5.340.0050.03216.15
5.5.330.0060.04617.49
5.5.320.0050.04917.13
5.5.310.0120.02717.43
5.5.300.0110.03816.07
5.5.290.0070.03716.14
5.5.280.0100.04317.55
5.5.270.0070.02417.53
5.5.260.0050.04717.43
5.5.250.0080.03717.48
5.5.240.0200.04017.35
5.5.230.0070.00714.30
5.5.220.0070.00714.36
5.5.210.0070.00714.34
5.5.200.0000.01614.32
5.5.190.0030.01014.02
5.5.180.0070.00713.97
5.5.170.0120.00314.22
5.5.160.0030.00614.28
5.5.150.0080.00314.34
5.5.140.0070.00714.25
5.5.130.0030.00714.44
5.5.120.0070.00714.35
5.5.110.0030.00914.23
5.5.100.0060.01014.35
5.5.90.0070.00414.39
5.5.80.0110.00314.11
5.5.70.0130.00014.19
5.5.60.0030.00714.07
5.5.50.0040.00814.34
5.5.40.0050.00514.01
5.5.30.0070.00414.28
5.5.20.0120.00414.26
5.5.10.0030.01314.45
5.5.00.0030.00513.86

preferences:
45.74 ms | 400 KiB | 5 Q