3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * The value of the $escape parameter doesn't matter * unless it's set to the one character that makes sense * then it f's up the escaping and produces invalid CSV data * */ $fh = fopen('php://stdout', 'w'); fputcsv($fh, ['using default', 'a,"b'], ',', '"'); fputcsv($fh, ['using " ', 'a,"b'], ',', '"', '"'); fputcsv($fh, ['using x ', 'a,"b'], ',', '"', 'x'); fputcsv($fh, ['using \\ ', 'a,"b'], ',', '"', '\\');

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.0000.01516.37
8.3.50.0110.01116.49
8.3.40.0110.00718.34
8.3.30.0110.00418.68
8.3.20.0000.00720.33
8.3.10.0040.00422.14
8.3.00.0030.01025.80
8.2.180.0120.00318.16
8.2.170.0070.01118.96
8.2.160.0110.00722.96
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00724.30
8.2.120.0070.00427.22
8.2.110.0070.00925.17
8.2.100.0070.00622.93
8.2.90.0130.00721.18
8.2.80.0150.00521.47
8.2.70.0130.00520.90
8.2.60.0140.00520.99
8.2.50.0140.00921.02
8.2.40.0100.00721.52
8.2.30.0110.00721.47
8.2.20.0130.00421.12
8.2.10.0150.00221.13
8.2.00.0080.00921.07
8.1.280.0140.00025.92
8.1.270.0060.00323.99
8.1.260.0020.00927.22
8.1.250.0020.00928.09
8.1.240.0050.00726.00
8.1.230.0070.00725.04
8.1.220.0130.00519.73
8.1.210.0100.00721.29
8.1.200.0110.00720.85
8.1.190.0070.00320.87
8.1.180.0120.00321.06
8.1.170.0110.00620.94
8.1.160.0100.00821.29
8.1.150.0100.00521.21
8.1.140.0080.00620.82
8.1.130.0110.00321.41
8.1.120.0100.00420.80
8.1.110.0110.00620.83
8.1.100.0120.00620.80
8.1.90.0140.00320.90
8.1.80.0140.00420.80
8.1.70.0120.00320.93
8.1.60.0080.00620.87
8.1.50.0130.00420.93
8.1.40.0140.00420.86
8.1.30.0130.00620.98
8.1.20.0160.00120.96
8.1.10.0160.00220.82
8.1.00.0090.00720.84
8.0.300.0120.00621.56
8.0.290.0170.00420.54
8.0.280.0100.00621.11
8.0.270.0110.00420.67
8.0.260.0110.00321.08
8.0.250.0100.00420.58
8.0.240.0100.00420.62
8.0.230.0090.01020.61
8.0.220.0130.00120.54
8.0.210.0090.00520.60
8.0.200.0100.00720.58
8.0.190.0110.00420.58
8.0.180.0120.00320.60
8.0.170.0110.00320.60
8.0.160.0090.00620.62
8.0.150.0110.00420.52
8.0.140.0120.00320.55
8.0.130.0110.00419.40
8.0.120.0120.00220.59
8.0.110.0100.00520.58
8.0.100.0080.00620.55
8.0.90.0120.00220.59
8.0.80.0100.00720.59
8.0.70.0080.00620.58
8.0.60.0070.00720.59
8.0.50.0110.00420.57
8.0.30.0130.00320.63
8.0.20.0130.00719.08
8.0.10.0130.00320.61
8.0.00.0110.00720.54
7.4.330.0080.00420.14
7.4.320.0140.00320.44
7.4.300.0130.00320.45
7.4.290.0090.00920.42
7.4.280.0130.00520.40
7.4.270.0110.00520.44
7.4.260.0150.00220.40
7.4.250.0110.00620.46
7.4.240.0170.00620.47
7.4.230.0190.00420.36
7.4.220.0120.01320.47
7.4.210.0110.00619.44
7.4.200.0150.00720.47
7.4.190.0170.00522.44
7.4.180.0130.00822.44
7.4.160.0170.00822.44
7.4.150.0160.00720.76
7.4.140.0120.00919.38
7.4.130.0190.00620.39
7.4.120.0160.00718.42
7.4.110.0190.00619.41
7.4.100.0150.00919.45
7.4.90.0160.00719.41
7.4.80.0170.00820.16
7.4.70.0160.00819.43
7.4.60.0140.00919.43
7.4.50.0170.00619.41
7.4.40.0190.00319.35
7.4.30.0180.00519.46
7.4.20.0220.00220.41
7.4.10.0150.00719.39
7.4.00.0130.00618.49
7.3.330.0120.00419.33
7.3.320.0140.00219.27
7.3.310.0140.00120.37
7.3.300.0120.00420.37
7.3.290.0140.00220.33
7.3.280.0100.00817.16
7.3.270.0150.00420.76
7.3.260.0120.00818.69
7.3.250.0150.00618.80
7.3.240.0120.00818.83
7.3.230.0160.00720.34
7.3.220.0170.00420.36
7.3.210.0180.00319.32
7.3.200.0170.00619.35
7.3.190.0180.00719.46
7.3.180.0190.01119.32
7.3.170.0190.00619.37
7.3.160.0150.00619.33
7.3.150.0210.00520.38
7.3.140.0160.00820.38
7.3.130.0180.00619.32
7.3.120.0170.00719.33
7.3.110.0150.00619.37
7.3.100.0140.00719.31
7.3.90.0160.00719.30
7.3.80.0150.00619.30
7.3.70.0130.00819.27
7.3.60.0180.00619.34
7.3.50.0180.00418.32
7.3.40.0120.00818.34
7.3.30.0120.00818.37
7.3.20.0450.00718.38
7.3.10.0420.00618.47
7.3.00.0460.00518.49
7.2.340.0160.00620.44
7.2.330.0150.00719.42
7.2.320.0200.00719.47
7.2.310.0220.00719.39
7.2.300.0210.00619.44
7.2.290.0130.01019.45
7.2.280.0200.00320.46
7.2.270.0190.00520.38
7.2.260.0150.00619.41
7.2.250.0140.01019.44
7.2.240.0120.00819.39
7.2.230.0150.01019.37
7.2.220.0180.00719.36
7.2.210.0160.00719.46
7.2.200.0160.01119.49
7.2.190.0200.00719.38
7.2.180.0130.01118.46
7.2.170.0120.00718.45
7.2.160.0180.00418.51
7.2.150.0470.00918.49
7.2.140.0490.00718.68
7.2.130.0480.00918.70
7.2.120.0230.01018.66
7.2.110.0250.01018.70
7.2.100.0310.00618.62
7.2.90.0340.00818.71
7.2.80.0450.00618.69
7.2.70.0360.00818.65
7.2.60.0370.00418.62
7.2.50.0380.00618.59
7.2.40.0520.00618.77
7.2.30.0400.00718.64
7.2.20.0440.00818.68
7.2.10.0380.00718.63
7.2.00.0310.00718.77
7.1.330.0210.00719.45
7.1.320.0220.00619.45
7.1.310.0150.00819.43
7.1.300.0140.00619.40
7.1.290.0150.00619.42
7.1.280.0110.00818.68
7.1.270.0130.00918.68
7.1.260.0130.00618.70
7.1.250.0500.00817.79
7.1.240.0380.00817.86
7.1.230.0250.00717.88
7.1.220.0260.00817.89
7.1.210.0370.00717.94
7.1.200.0310.01017.92
7.1.190.0350.00817.89
7.1.180.0510.00817.85
7.1.170.0460.00617.84
7.1.160.0530.00817.88
7.1.150.0360.00717.90
7.1.140.0350.00817.87
7.1.130.0440.00717.91
7.1.120.0310.00717.87
7.1.110.0340.00717.84
7.1.100.0380.00717.25
7.1.90.0280.00617.22
7.1.80.0220.00817.27
7.1.70.0310.00717.32
7.1.60.0360.00719.79
7.1.50.0420.00519.83
7.1.40.0420.00719.79
7.1.30.0360.00819.81
7.1.20.0270.00719.87
7.1.10.0270.01017.23
7.1.00.0280.00817.28
7.0.330.0390.00817.72
7.0.320.0300.00817.80
7.0.310.0390.00517.75
7.0.300.0470.00317.77
7.0.290.0470.00717.72
7.0.280.0480.00817.72
7.0.270.0420.00517.76
7.0.260.0510.00817.78
7.0.250.0320.00917.81
7.0.240.0320.00717.04
7.0.230.0220.01016.96
7.0.220.0390.00517.06
7.0.210.0430.00617.00
7.0.200.0430.00717.15
7.0.190.0230.01017.08
7.0.180.0340.00917.04
7.0.170.0330.00517.06
7.0.160.0360.00717.04
7.0.150.0340.00517.06
7.0.140.0330.00717.05
7.0.130.0330.00716.97
7.0.120.0380.00817.03
7.0.110.0210.00717.01
7.0.100.0400.00417.06
7.0.90.0350.01017.03
7.0.80.0340.00717.05
7.0.70.0310.00717.01
7.0.60.0750.00716.98
7.0.50.0280.00616.99
7.0.40.0290.00916.95
7.0.30.0360.00516.97
7.0.20.0300.00917.05
7.0.10.0360.00517.09
7.0.00.0350.00716.93
5.6.400.0180.00518.75
5.6.390.0150.00918.79
5.6.380.0150.00717.81
5.6.370.0130.00718.74
5.6.360.0160.00718.71
5.6.350.0140.00818.69
5.6.340.0160.00718.68
5.6.330.0140.00818.64
5.6.320.0150.00718.75
5.6.310.0160.00617.91
5.6.300.0150.00517.86
5.6.290.0130.00717.86
5.6.280.0130.00817.83
5.6.270.0160.00617.81
5.6.260.0150.00817.88
5.6.250.0130.00817.84
5.6.240.0150.00617.77
5.6.230.0140.00817.88
5.6.220.0170.00517.78
5.6.210.0160.00617.83
5.6.200.0150.00517.79
5.6.190.0140.00417.72
5.6.180.0180.00417.79
5.6.170.0120.00817.75
5.6.160.0150.00717.78
5.6.150.0180.00517.72
5.6.140.0130.00917.75
5.6.130.0170.00617.76
5.6.120.0130.00817.84
5.6.110.0140.00717.76
5.6.100.0130.00717.12
5.6.90.0150.00717.87
5.6.80.0160.00517.82
5.6.70.0120.00817.71
5.6.60.0140.00717.77
5.6.50.0140.00717.83
5.6.40.0150.00717.74
5.6.30.0130.00917.72
5.6.20.0140.00717.65
5.6.10.0120.00917.79
5.6.00.0150.00617.72

preferences:
53.2 ms | 401 KiB | 5 Q