3v4l.org

run code in 300+ PHP versions simultaneously
<?php $crlf = chr(13) . chr(10); $cr = chr(13); $delimiter = '|'; // 7 rows, 5th row has CR linebreak inside $lines = [ 'A', 'a', 'C15|C18|C21|C36|C42|C45|C48|C51|C54|C60|C63|C66|C69|C72|C75|C81|C84|C90|C93|C96|C99|C102|C105|C108|C111', '02-DEC-19|02-DEC-19|707403|GUEST|||PPPPPP||||||RR||||RRSSIAN||FFFF|||||+1111-11-11-111|', '02-DEC-19|02-DEC-19|707404|GUEST|SDDDDD|ВВВВВВВВВВВВ|PPPPPP|СССССС|ПППППП||01.01.1111|M|RR|ППППП|"ПППППППП кккк' . $cr . '"|MISSING LINE CONTENTS|', 'FF_FFFF|FF_1', '|1', ]; $csv = implode($crlf, $lines); $filePath = tempnam(sys_get_temp_dir(), 'csv'); file_put_contents($filePath, $csv); $file = fopen($filePath, 'r'); //ini_set('auto_detect_line_endings', true); $rows = []; while (!feof($file)) { $row = fgetcsv($file, 0, $delimiter, '"', "\0"); if ($row === null) { print_r("NULL result found though `SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE` flags set.\n"); } else { $rows[] = implode($delimiter, $row); } } if (implode($crlf, $lines) !== implode($crlf, $rows)) { print_r("Error! Expected:\n"); print_r($lines); print_r("Parsed as:\n"); print_r($rows); } else { print_r("Passed."); }

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.0130.00618.55
8.3.50.0060.00918.10
8.3.40.0110.00718.80
8.3.30.0070.01018.79
8.3.20.0040.00420.90
8.3.10.0000.00820.25
8.3.00.0040.00422.39
8.2.180.0150.00616.63
8.2.170.0120.00322.96
8.2.160.0150.00022.09
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0040.00426.16
8.2.110.0140.00722.25
8.2.100.0090.00317.84
8.2.90.0040.00417.75
8.2.80.0030.00518.73
8.2.70.0050.00517.93
8.2.60.0040.00418.03
8.2.50.0030.00518.10
8.2.40.0050.00519.48
8.2.30.0000.00719.42
8.2.20.0080.00018.15
8.2.10.0030.00521.10
8.2.00.0050.00219.34
8.1.280.0040.01425.92
8.1.270.0080.00022.65
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0100.00024.01
8.1.230.0070.00420.89
8.1.220.0060.00317.78
8.1.210.0030.00518.77
8.1.200.0070.00317.10
8.1.190.0050.00317.25
8.1.180.0000.00818.99
8.1.170.0030.00518.71
8.1.160.0040.00418.98
8.1.150.0040.00418.93
8.1.140.0050.00322.17
8.1.130.0040.00420.23
8.1.120.0070.00017.50
8.1.110.0060.00317.48
8.1.100.0000.00717.39
8.1.90.0000.00817.50
8.1.80.0040.00417.51
8.1.70.0070.00017.38
8.1.60.0000.00817.63
8.1.50.0000.00817.53
8.1.40.0090.00017.57
8.1.30.0050.00317.67
8.1.20.0030.00517.61
8.1.10.0030.00517.52
8.1.00.0040.00417.53
8.0.300.0050.00318.77
8.0.290.0060.00316.88
8.0.280.0020.00518.54
8.0.270.0070.00017.24
8.0.260.0070.00020.06
8.0.250.0030.00317.11
8.0.240.0000.00617.05
8.0.230.0000.00717.04
8.0.220.0000.00716.90
8.0.210.0030.00316.90
8.0.200.0000.00717.11
8.0.190.0040.00417.06
8.0.180.0040.00416.91
8.0.170.0000.00917.06
8.0.160.0080.00016.98
8.0.150.0050.00216.98
8.0.140.0100.00016.94
8.0.130.0000.00613.48
8.0.120.0050.00316.99
8.0.110.0000.00716.98
8.0.100.0050.00216.97
8.0.90.0000.00917.04
8.0.80.0060.01016.92
8.0.70.0040.00416.88
8.0.60.0070.00016.89
8.0.50.0000.00816.90
8.0.30.0130.00517.00
8.0.20.0090.00917.10
8.0.10.0000.00816.93
8.0.00.0150.00916.62
7.4.330.0050.00015.55
7.4.320.0000.00716.55
7.4.300.0070.00016.65
7.4.290.0030.00316.68
7.4.280.0000.00816.59
7.4.270.0040.00416.66
7.4.260.0000.00513.44
7.4.250.0040.00416.63
7.4.240.0070.00116.59
7.4.230.0040.00316.69
7.4.220.0000.00716.56
7.4.210.0000.01816.75
7.4.200.0030.00316.48
7.4.130.0090.01016.69
7.4.120.0100.01316.47
7.4.110.0090.00916.46
7.4.100.0070.01716.56
7.4.90.0100.00716.46
7.4.80.0120.00619.39
7.4.70.0060.01116.49
7.4.60.0120.00916.49
7.4.50.0110.00016.56
7.4.40.0080.01016.56
7.4.10.0100.01014.84
7.4.00.0060.01315.00
7.3.330.0060.00616.25
7.3.320.0000.00613.39
7.3.310.0040.00416.36
7.3.300.0040.00416.28
7.3.290.0000.00716.27
7.3.280.0110.00716.53
7.3.260.0170.00916.64
7.3.240.0090.01016.49
7.3.230.0070.01116.59
7.3.210.0110.00716.52
7.3.200.0030.01316.33
7.3.190.0070.01016.46
7.3.180.0070.01416.47
7.3.170.0090.00916.52
7.3.160.0130.00316.48
7.3.130.0060.00914.86
7.3.120.0140.00714.73
7.3.110.0080.00814.86
7.3.100.0030.01215.07
7.3.90.0060.00814.97
7.3.80.0090.00814.65
7.3.70.0020.01114.84
7.3.60.0050.00814.65
7.3.50.0080.00914.66
7.3.40.0040.01214.77
7.3.30.0060.00614.77
7.3.20.0030.01415.70
7.3.10.0100.00715.65
7.3.00.0070.00915.68
7.2.330.0090.00916.63
7.2.320.0070.01016.70
7.2.310.0090.00916.73
7.2.300.0150.00916.51
7.2.290.0140.00716.73
7.2.260.0100.01015.32
7.2.250.0070.01115.04
7.2.240.0090.00514.90
7.2.230.0060.00814.98
7.2.220.0070.00815.17
7.2.210.0070.01015.12
7.2.200.0050.01014.90
7.2.190.0050.01315.03
7.2.180.0080.01014.85
7.2.170.0060.01115.10
7.2.160.0090.00015.05
7.2.150.0060.01017.11
7.2.140.0080.00817.00
7.2.130.0030.00917.00
7.2.120.0140.00016.98
7.2.110.0070.00716.87
7.2.100.0070.00716.96
7.2.90.0090.00616.58
7.2.80.0000.01717.18
7.2.70.0000.01516.94
7.2.60.0040.01116.96
7.2.50.0080.00417.14
7.2.40.0120.00317.02
7.2.30.0150.00417.04
7.2.20.0120.00817.01
7.2.10.0040.00716.99
7.2.00.0110.00716.70
7.1.330.0080.00513.83
7.1.320.0110.00513.77
7.1.310.0140.00714.07
7.1.300.0060.00913.89
7.1.290.0100.00913.62
7.1.280.0110.00813.74
7.1.270.0140.01013.83
7.1.260.0100.00713.65

preferences:
42.11 ms | 401 KiB | 5 Q