3v4l.org

run code in 300+ PHP versions simultaneously
<?php $delim = ','; $enclosure = '"'; $escape = '~'; $data = ['', '"', 'foo"', '\\"', '\\~', 'foo\\~']; $input = fopen('php://temp,', 'w+'); fputcsv($input, $data, $delim, $enclosure, $escape); rewind($input); $csv = stream_get_contents($input); var_dump($csv); $output = fopen('php://temp', 'r+'); fwrite($output, $csv); rewind($output); var_dump($parsed = fgetcsv($output, 0, $delim, $enclosure, $escape), $data === $parsed);

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.0140.00416.48
8.3.50.0070.01221.12
8.3.40.0070.01118.84
8.3.30.0070.01118.71
8.3.20.0050.00321.82
8.3.10.0030.00620.34
8.3.00.0080.00021.75
8.2.180.0120.00318.23
8.2.170.0090.00922.96
8.2.160.0040.01121.01
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0070.01721.05
8.2.100.0080.00417.66
8.2.90.0000.00817.72
8.2.80.0040.00418.04
8.2.70.0030.00517.93
8.2.60.0000.01018.22
8.2.50.0000.00818.10
8.2.40.0040.00419.30
8.2.30.0040.00419.19
8.2.20.0040.00417.95
8.2.10.0040.00419.29
8.2.00.0050.00319.33
8.1.280.0150.00625.92
8.1.270.0000.00722.18
8.1.260.0100.00026.35
8.1.250.0050.00228.09
8.1.240.0170.00323.83
8.1.230.0080.00322.66
8.1.220.0060.00317.74
8.1.210.0000.00820.07
8.1.200.0070.00717.00
8.1.190.0060.00317.36
8.1.180.0050.00318.10
8.1.170.0000.00918.51
8.1.160.0040.00418.75
8.1.150.0040.00418.77
8.1.140.0070.00022.24
8.1.130.0000.00719.98
8.1.120.0040.00417.46
8.1.110.0040.00417.27
8.1.100.0040.00417.38
8.1.90.0080.00017.26
8.1.80.0030.00517.39
8.1.70.0030.00317.40
8.1.60.0060.00317.50
8.1.50.0040.00417.46
8.1.40.0030.00617.41
8.1.30.0070.00417.54
8.1.20.0030.00617.55
8.1.10.0040.00417.53
8.1.00.0040.00417.30
8.0.300.0030.00522.03
8.0.290.0090.00016.75
8.0.280.0000.00718.40
8.0.270.0040.00417.25
8.0.260.0000.00820.00
8.0.250.0000.00716.93
8.0.240.0000.00716.97
8.0.230.0080.00016.85
8.0.220.0030.00316.82
8.0.210.0030.00516.74
8.0.200.0030.00316.91
8.0.190.0030.00616.91
8.0.180.0070.00016.88
8.0.170.0060.00316.89
8.0.160.0050.00316.94
8.0.150.0040.00416.81
8.0.140.0000.00716.82
8.0.130.0030.00313.27
8.0.120.0030.00616.80
8.0.110.0040.00416.93
8.0.100.0050.00216.94
8.0.90.0030.00616.84
8.0.80.0070.00716.91
8.0.70.0070.00016.95
8.0.60.0020.00516.71
8.0.50.0040.00416.79
8.0.30.0100.01017.27
8.0.20.0130.00717.11
8.0.10.0070.00016.94
8.0.00.0120.00616.65
7.4.330.0060.00015.55
7.4.320.0000.00616.55
7.4.300.0000.00716.51
7.4.290.0100.00016.59
7.4.280.0080.00016.39
7.4.270.0040.00416.59
7.4.260.0070.00016.44
7.4.250.0030.00316.56
7.4.240.0040.00316.57
7.4.230.0030.00316.60
7.4.220.0070.00016.59
7.4.210.0070.00716.52
7.4.200.0040.00416.41
7.4.140.0070.01117.86
7.4.130.0110.00816.61
7.4.120.0090.01516.75
7.4.110.0100.00716.43
7.4.100.0080.00816.55
7.4.90.0130.01016.48
7.4.80.0090.00919.39
7.4.70.0030.01316.52
7.4.60.0090.00916.52
7.4.50.0060.00916.28
7.4.40.0140.00316.39
7.4.10.0110.00715.14
7.4.00.0110.00614.84
7.3.330.0040.00413.18
7.3.320.0030.00313.09
7.3.310.0030.00316.34
7.3.300.0070.00016.32
7.3.290.0000.00716.21
7.3.280.0060.01216.26
7.3.260.0080.00916.33
7.3.230.0140.00416.33
7.3.210.0070.01016.29
7.3.200.0100.00516.48
7.3.190.0040.01316.49
7.3.180.0070.01416.23
7.3.170.0140.00316.41
7.3.160.0000.01616.34
7.3.130.0120.00614.68
7.3.120.0070.01014.58
7.3.110.0090.00914.62
7.3.100.0060.00614.64
7.3.90.0060.00614.85
7.3.80.0060.00914.56
7.3.70.0080.00614.79
7.3.60.0050.01314.56
7.3.50.0060.00914.83
7.3.40.0110.00514.84
7.3.30.0030.01014.69
7.3.20.0070.00715.69
7.3.10.0050.00915.74
7.3.00.0080.00715.59
7.2.330.0120.00616.59
7.2.320.0100.00716.39
7.2.310.0090.00916.61
7.2.300.0140.00316.63
7.2.290.0080.00916.53
7.2.260.0040.01414.96
7.2.250.0090.00914.89
7.2.240.0030.01114.72
7.2.230.0070.01115.12
7.2.220.0030.00915.17
7.2.210.0000.01414.64
7.2.200.0070.00514.83
7.2.190.0060.00815.03
7.2.180.0080.01014.81
7.2.170.0090.01114.91
7.2.160.0040.01214.89
7.2.150.0040.01016.01
7.2.140.0050.01115.92
7.2.130.0070.00715.87
7.2.120.0060.01115.71
7.2.110.0080.00815.85
7.2.100.0050.01115.89
7.2.90.0080.00615.77
7.2.80.0030.01315.90
7.2.70.0090.00815.85
7.2.60.0090.00915.72
7.2.50.0120.00515.87
7.2.40.0090.00615.92
7.2.30.0030.01515.88
7.2.20.0080.00815.95
7.2.10.0130.00815.88
7.2.00.0270.00915.87
7.1.330.0100.00316.01
7.1.320.0000.00915.87
7.1.310.0050.00515.86
7.1.300.0110.00314.85
7.1.290.0090.00614.76
7.1.280.0070.00814.74
7.1.270.0080.00514.85
7.1.260.0090.00714.85
7.1.250.0080.00714.50
7.1.240.0060.00815.77
7.1.230.0060.00615.52
7.1.220.0100.00315.41
7.1.210.0070.00715.60
7.1.200.0060.00915.52
7.1.190.0110.00015.77
7.1.180.0100.00315.75
7.1.170.0060.00915.90
7.1.160.0120.00615.48
7.1.150.0000.00915.82
7.1.140.0130.00315.93
7.1.130.0060.00915.53
7.1.120.0050.00515.55
7.1.110.0030.00915.76
7.1.100.0090.00615.80
7.1.90.0070.00715.72
7.1.80.0030.01015.78
7.1.70.0060.01015.36
7.1.60.0070.00715.53
7.1.50.0070.01015.96
7.1.40.0070.01015.71
7.1.30.0090.00315.87
7.1.20.0070.01015.87
7.1.10.0000.01115.69
7.1.00.0000.01515.58

preferences:
42.69 ms | 401 KiB | 5 Q