3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = '"slug,1", slug 2, test, "slug, 3", "", ",",'; function is_valid_plugin_slug($slug) { return trim($slug, ", \t\n\r\0\x0B") !== ''; } function parse($data) { $plugins = str_getcsv( str_replace('""', '', $data ) ); return array_filter($plugins, 'is_valid_plugin_slug'); } echo "Bare str_getcsv:\n"; $plugins = str_getcsv( $data ); var_dump( $plugins ); echo "\n\nstr_getcsv with filtering:\n"; var_dump( parse( $data ) );

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.4.20.0100.01020.67
8.4.10.0060.00318.54
8.3.150.0180.00017.12
8.3.140.0030.00520.91
8.3.130.0050.00318.54
8.3.120.0030.00619.00
8.3.110.0050.00520.94
8.3.100.0040.00416.59
8.3.90.0070.00716.38
8.3.80.0060.00318.31
8.3.70.0110.00416.58
8.3.60.0130.00316.63
8.3.50.0070.01316.30
8.3.40.0130.00918.87
8.3.30.0110.00418.58
8.3.20.0040.00424.18
8.3.10.0090.00024.66
8.3.00.0070.00026.16
8.2.270.0120.00616.51
8.2.260.0100.00017.04
8.2.250.0080.00016.63
8.2.240.0090.00619.16
8.2.230.0060.00322.58
8.2.220.0090.00624.06
8.2.210.0060.00926.77
8.2.200.0030.00618.41
8.2.190.0140.00416.63
8.2.180.0100.01025.92
8.2.170.0100.00318.95
8.2.160.0120.00322.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0070.00026.16
8.2.110.0000.00922.25
8.2.100.0040.00817.71
8.2.90.0000.00818.03
8.2.80.0060.00319.18
8.2.70.0030.00619.35
8.2.60.0050.00517.68
8.2.50.0000.00818.07
8.2.40.0030.00619.84
8.2.30.0040.00417.79
8.2.20.0000.00818.06
8.2.10.0000.00819.17
8.2.00.0000.00719.13
8.1.310.0000.00816.89
8.1.300.0040.00817.97
8.1.290.0060.00618.88
8.1.280.0110.00425.92
8.1.270.0080.00020.39
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.96
8.1.230.0000.01222.70
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0040.00417.22
8.1.190.0080.00017.23
8.1.180.0050.00318.10
8.1.170.0030.00618.56
8.1.160.0040.00419.02
8.1.150.0050.00318.54
8.1.140.0050.00318.90
8.1.130.0070.00020.27
8.1.120.0040.00417.43
8.1.110.0000.00717.29
8.1.100.0000.00817.39
8.1.90.0050.00317.42
8.1.80.0030.00717.23
8.1.70.0040.00417.39
8.1.60.0030.00517.48
8.1.50.0040.00417.51
8.1.40.0000.00717.52
8.1.30.0030.00517.55
8.1.20.0000.00817.67
8.1.10.0080.00017.51
8.1.00.0000.00717.46
8.0.300.0100.00020.20
8.0.290.0000.00716.63
8.0.280.0040.00418.51
8.0.270.0000.00718.06
8.0.260.0000.00718.58
8.0.250.0000.00716.77
8.0.240.0030.00616.92
8.0.230.0030.00316.77
8.0.220.0000.00616.85
8.0.210.0000.00716.80
8.0.200.0060.00016.91
8.0.190.0000.00816.89
8.0.180.0080.00016.88
8.0.170.0030.00516.90
8.0.160.0040.00416.79
8.0.150.0000.00716.85
8.0.140.0040.00316.79
8.0.130.0000.00513.20
8.0.120.0040.00416.69
8.0.110.0070.00016.80
8.0.100.0030.00616.73
8.0.90.0000.00716.90
8.0.80.0000.00816.71
8.0.70.0040.00416.63
8.0.60.0040.00416.77
8.0.50.0030.00616.83
8.0.30.0050.00316.85
8.0.20.0040.00416.89
8.0.10.0070.00017.07
8.0.00.0040.00416.89
7.4.330.0040.00015.55
7.4.320.0030.00316.48
7.4.300.0030.00616.50
7.4.290.0030.00516.37
7.4.280.0000.00816.45
7.4.270.0070.00016.59
7.4.260.0030.00616.58
7.4.250.0040.00416.39
7.4.240.0000.00716.63
7.4.230.0070.00016.56
7.4.220.0050.00516.64
7.4.210.0000.00816.70
7.4.200.0030.00616.61
7.4.190.0040.00416.39
7.4.180.0030.00516.78
7.4.160.0000.00716.41
7.4.150.0050.00316.38
7.4.140.0040.00416.36
7.4.130.0070.00016.31
7.4.120.0000.00716.27
7.4.110.0040.00416.48
7.4.100.0040.00416.49
7.4.90.0040.00416.28
7.4.80.0040.00416.57
7.4.70.0000.00716.52
7.4.60.0020.00516.45
7.4.50.0040.00416.43
7.4.40.0080.00016.14
7.4.30.0000.00916.63
7.4.20.0030.00516.36
7.4.10.0030.00616.53
7.4.00.0090.00016.41
7.3.330.0040.00416.29
7.3.320.0050.00013.07
7.3.310.0030.00316.22
7.3.300.0000.00716.20
7.3.290.0050.00216.12
7.3.280.0040.00416.15
7.3.270.0030.00316.11
7.3.260.0000.00716.19
7.3.250.0000.00716.20
7.3.240.0030.00616.10
7.3.230.0030.00616.26
7.3.220.0080.00016.26
7.3.210.0060.00316.06
7.3.200.0030.00616.26
7.3.190.0070.00016.31
7.3.180.0030.00316.29
7.3.170.0040.00416.22
7.3.160.0040.00416.10
7.3.150.0030.00316.20
7.3.140.0040.00316.13
7.3.130.0070.00016.07
7.3.120.0040.00416.14
7.3.110.0000.00716.07
7.3.100.0030.00316.13
7.3.90.0000.00816.46
7.3.80.0030.00516.06
7.3.70.0000.00716.20
7.3.60.0040.00416.42
7.3.50.0070.00016.29
7.3.40.0000.00716.42
7.3.30.0040.00416.27
7.3.20.0110.00016.23
7.3.10.0080.00016.31
7.3.00.0020.00516.35

preferences:
30.3 ms | 406 KiB | 6 Q