3v4l.org

run code in 300+ PHP versions simultaneously
<?php fclose(STDIN); fclose(STDOUT); fclose(STDERR); $STDIN = fopen('/dev/null', 'r'); $STDOUT = fopen('php://output', 'wb'); $STDERR = fopen('/dev/null', 'wb'); class TestFilterClass { function filter($in, $out) { while (true) { $bucket = stream_bucket_make_writeable($in); if (is_object($bucket)) { $bucket->data = sprintf('[%s] %s', __METHOD__, $bucket->data); stream_bucket_append($out, $bucket); } break; } return PSFS_PASS_ON; } } if (stream_filter_register('TestFilter', 'TestFilterClass')) { $handle = stream_filter_append($STDOUT, 'TestFilter'); if (is_resource($handle)) { fwrite($STDOUT, 'hello world' . PHP_EOL); // ok echo 'hello world' . PHP_EOL; // nope stream_filter_remove($handle); } }

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.40.0080.00818.67
8.3.30.0140.00020.17
8.3.20.0060.00318.79
8.3.10.0070.00020.80
8.3.00.0030.00519.69
8.2.170.0150.00618.79
8.2.160.0150.00022.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00419.77
8.2.110.0110.00822.07
8.2.100.0080.00317.91
8.2.90.0060.00319.11
8.2.80.0000.00819.35
8.2.70.0030.00617.50
8.2.60.0000.00917.80
8.2.50.0040.00418.07
8.2.40.0000.00818.22
8.2.30.0000.00921.36
8.2.20.0040.00417.67
8.2.10.0050.00217.51
8.2.00.0040.00417.51
8.1.270.0040.00423.99
8.1.260.0140.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00422.31
8.1.230.0080.00420.95
8.1.220.0000.00818.77
8.1.210.0000.00818.97
8.1.200.0040.00817.22
8.1.190.0050.00317.39
8.1.180.0050.00318.10
8.1.170.0060.00318.58
8.1.160.0040.00418.80
8.1.150.0040.00418.59
8.1.140.0040.00417.31
8.1.130.0030.00317.78
8.1.120.0000.00717.39
8.1.110.0070.00017.29
8.1.100.0090.00017.31
8.1.90.0030.00317.39
8.1.80.0040.00417.45
8.1.70.0080.00017.41
8.1.60.0040.00417.57
8.1.50.0040.00417.38
8.1.40.0050.00317.37
8.1.30.0000.00817.54
8.1.20.0000.00817.50
8.1.10.0000.00817.30
8.1.00.0000.00817.35
8.0.300.0060.00320.02
8.0.290.0040.00417.05
8.0.280.0070.00018.38
8.0.270.0030.00316.83
8.0.260.0070.00016.77
8.0.250.0080.00017.06
8.0.240.0000.01017.05
8.0.230.0000.00717.04
8.0.220.0000.00716.95
8.0.210.0000.00716.87
8.0.200.0050.00317.11
8.0.190.0000.00717.00
8.0.180.0000.00716.95
8.0.170.0030.00516.87
8.0.160.0070.00016.93
8.0.150.0030.00517.00
8.0.140.0000.00716.98
8.0.130.0000.00513.37
8.0.120.0000.00816.94
8.0.110.0040.00416.76
8.0.100.0000.00717.03
8.0.90.0040.00416.84
8.0.80.0090.00617.00
8.0.70.0000.00717.00
8.0.60.0040.00416.96
8.0.50.0040.00416.91
8.0.30.0110.00816.98
8.0.20.0120.00817.40
8.0.10.0050.00217.09
8.0.00.0080.01016.66
7.4.330.0050.00016.77
7.4.320.0030.00616.44
7.4.300.0000.00616.36
7.4.290.0000.00616.55
7.4.280.0090.00016.44
7.4.270.0030.00316.56
7.4.260.0030.00313.28
7.4.250.0030.00616.37
7.4.240.0070.00016.54
7.4.230.0000.00816.57
7.4.220.0130.01316.40
7.4.210.0060.01016.48
7.4.200.0000.00816.62
7.4.190.0050.00216.38
7.4.160.0050.01116.46
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0080.01116.38
7.4.120.0070.01216.62
7.4.110.0070.01016.42
7.4.100.0110.00716.51
7.4.90.0080.01716.39
7.4.80.0030.01319.39
7.4.70.0100.00716.38
7.4.60.0100.00616.55
7.4.50.0000.00816.46
7.4.40.0140.00622.77
7.4.30.0130.00916.42
7.4.10.0110.00714.95
7.4.00.0080.00814.89
7.3.330.0030.00313.39
7.3.320.0030.00313.43
7.3.310.0040.00416.34
7.3.300.0030.00316.33
7.3.290.0140.00016.38
7.3.280.0080.01016.31
7.3.270.0190.01617.40
7.3.260.0160.00418.24
7.3.250.0130.00516.33
7.3.240.0130.00316.39
7.3.230.0100.00716.39
7.3.210.0070.01016.40
7.3.200.0060.01619.39
7.3.190.0040.01416.55
7.3.180.0100.01016.55
7.3.170.0070.01016.57
7.3.160.0100.00716.51
7.3.130.0090.00614.79
7.3.120.0100.00714.75
7.3.110.0090.00814.80
7.3.100.0090.00714.74
7.3.90.0050.01314.89
7.3.80.0040.01114.73
7.3.70.0060.00614.76
7.3.60.0090.00714.80
7.3.50.0070.00714.70
7.3.40.0070.00514.70
7.3.30.0070.00314.57
7.3.20.0060.00816.51
7.3.10.0080.00516.68
7.3.00.0050.00716.60
7.2.330.0090.01216.40
7.2.320.0130.00716.47
7.2.310.0130.00616.38
7.2.300.0040.01216.35
7.2.290.0070.01016.62
7.2.260.0000.01414.95
7.2.250.0080.01114.96
7.2.240.0050.01115.03
7.2.230.0080.01014.88
7.2.220.0050.00914.96
7.2.210.0040.01215.03
7.2.200.0070.00414.96
7.2.190.0030.01014.72
7.2.180.0080.00714.83
7.2.170.0070.00514.94
7.2.160.0080.00314.70
7.2.150.0050.01316.41
7.2.140.0030.01016.83
7.2.130.0050.00816.91
7.2.120.0050.00916.71
7.2.110.0050.01116.89
7.2.100.0060.00516.79
7.2.90.0080.00716.76
7.2.80.0110.00216.80
7.2.70.0010.00916.81
7.2.60.0090.00416.81
7.2.50.0040.00816.68
7.2.40.0060.00816.90
7.2.30.0060.00616.75
7.2.20.0050.00816.87
7.2.10.0070.00716.72
7.2.00.0070.00716.50
7.1.330.0070.00915.52
7.1.320.0070.00515.63
7.1.310.0100.00515.70
7.1.300.0050.01115.60
7.1.290.0080.00515.72
7.1.280.0030.00815.80
7.1.270.0050.00715.63
7.1.260.0100.00515.48
7.1.250.0080.00315.75
7.1.240.0090.00915.69
7.1.230.0060.00615.92
7.1.220.0070.00415.59
7.1.210.0000.00915.80
7.1.200.0080.00915.54
7.1.190.0070.00715.60
7.1.180.0030.00615.86
7.1.170.0100.01015.58
7.1.160.0030.00515.55
7.1.150.0000.01115.64
7.1.140.0060.00615.78
7.1.130.0080.00315.71
7.1.120.0090.00615.84
7.1.110.0030.00715.64
7.1.100.0060.00817.09
7.1.90.0060.00915.90
7.1.80.0070.00715.71
7.1.70.0080.00616.34
7.1.60.0040.01116.61
7.1.50.0130.00616.29
7.1.40.0040.01116.06
7.1.30.0040.01016.01
7.1.20.0100.00516.24
7.1.10.0110.00416.03
7.1.00.0060.00816.17
7.0.330.0040.01115.35
7.0.320.0030.00815.29
7.0.310.0100.00315.35
7.0.300.0130.00715.29
7.0.290.0100.00315.13
7.0.280.0060.00615.41
7.0.270.0050.00315.39
7.0.260.0060.00315.43
7.0.250.0130.00315.34
7.0.240.0000.01615.13
7.0.230.0080.00015.52
7.0.220.0130.00315.28
7.0.210.0050.00515.50
7.0.200.0080.00415.90
7.0.190.0070.00716.00
7.0.180.0110.00515.77
7.0.170.0030.01115.80
7.0.160.0070.00815.71
7.0.150.0060.00815.84
7.0.140.0050.00915.97
7.0.130.0100.00316.00
7.0.120.0090.00415.85
7.0.110.0070.00715.84
7.0.100.0080.00415.74
7.0.90.0050.00815.75
7.0.80.0090.00615.79
7.0.70.0080.00515.76
7.0.60.0070.00815.69
7.0.50.0070.00515.97
7.0.40.0050.01414.10
7.0.30.0040.00914.08
7.0.20.0060.00613.99
7.0.10.0070.00614.15
7.0.00.0050.00914.11
5.6.400.0030.01014.40
5.6.390.0000.01613.87
5.6.380.0070.00714.08
5.6.370.0030.01014.38
5.6.360.0060.00314.13
5.6.350.0100.00314.24
5.6.340.0120.00414.30
5.6.330.0070.00413.93
5.6.320.0100.00314.28
5.6.310.0000.01214.38
5.6.300.0050.02717.66
5.6.290.0060.04617.51
5.6.280.0090.03317.54
5.6.270.0110.02817.62
5.6.260.0030.03617.56
5.6.250.0060.02617.55
5.6.240.0000.04217.58
5.6.230.0030.04717.57
5.6.220.0090.04017.61
5.6.210.0050.03217.54
5.6.200.0090.04517.68
5.6.190.0020.03017.56
5.6.180.0080.02417.58
5.6.170.0090.03017.57
5.6.160.0060.02417.46
5.6.150.0030.03917.63
5.6.140.0080.02217.58
5.6.130.0050.02817.56
5.6.120.0010.03217.57
5.6.110.0070.02417.73
5.6.100.0050.02717.51
5.6.90.0060.02617.51
5.6.80.0030.02417.20
5.6.70.0110.01917.11
5.6.60.0030.02717.24
5.6.50.0060.02517.32
5.6.40.0080.02117.21
5.6.30.0060.04017.12
5.6.20.0060.02717.30
5.6.10.0030.02817.08
5.6.00.0050.03717.18
5.5.380.0080.01815.75
5.5.370.0000.03715.88
5.5.360.0020.03915.86
5.5.350.0050.03315.97
5.5.340.0050.02216.07
5.5.330.0020.02716.13
5.5.320.0040.02216.16
5.5.310.0030.02616.08
5.5.300.0050.03916.06
5.5.290.0070.02616.15
5.5.280.0090.02515.92
5.5.270.0020.03116.02
5.5.260.0030.03216.02
5.5.250.0030.02516.04
5.5.240.0020.02915.62
5.5.230.0050.02415.81
5.5.220.0060.02015.88
5.5.210.0040.03515.65
5.5.200.0050.02615.60
5.5.190.0080.02415.77
5.5.180.0050.02315.64
5.5.170.0060.00613.91
5.5.160.0030.02515.71
5.5.150.0020.02715.68
5.5.140.0050.02815.86
5.5.130.0020.03115.76
5.5.120.0050.02315.87
5.5.110.0050.02215.63
5.5.100.0030.02215.62
5.5.90.0030.02415.70
5.5.80.0030.02815.60
5.5.70.0070.03115.68
5.5.60.0020.04515.58
5.5.50.0070.02415.48
5.5.40.0050.03815.69
5.5.30.0030.02215.55
5.5.20.0060.02415.59
5.5.10.0030.02715.68
5.5.00.0060.03215.54
5.4.450.0110.02115.91
5.4.440.0060.02115.91
5.4.430.0030.02315.82
5.4.420.0020.02515.81
5.4.410.0030.02615.72
5.4.400.0020.02415.62
5.4.390.0020.02515.67
5.4.380.0020.02715.72
5.4.370.0050.02115.70
5.4.360.0030.03715.71
5.4.350.0050.02115.72
5.4.340.0020.03015.63
5.4.330.0060.00012.33
5.4.320.0040.02215.73
5.4.310.0030.03015.77
5.4.300.0050.02215.78
5.4.290.0020.02615.65
5.4.280.0050.04015.62
5.4.270.0050.02215.65
5.4.260.0000.02415.65
5.4.250.0040.04015.78
5.4.240.0040.02715.63
5.4.230.0040.02415.63
5.4.220.0050.02415.62
5.4.210.0060.02215.66
5.4.200.0030.02015.65
5.4.190.0010.03715.76
5.4.180.0020.02415.65
5.4.170.0050.02115.73
5.4.160.0010.03515.63
5.4.150.0050.04015.59
5.4.140.0060.02614.55
5.4.130.0030.03114.57
5.4.120.0020.03014.53
5.4.110.0070.02014.55
5.4.100.0030.02214.56
5.4.90.0000.02314.51
5.4.80.0070.03214.54
5.4.70.0020.03914.40
5.4.60.0020.03014.52
5.4.50.0040.02114.52
5.4.40.0020.02514.47
5.4.30.0080.01914.52
5.4.20.0030.04214.46
5.4.10.0060.02014.50
5.4.00.0050.02114.18
5.3.290.0020.02413.56
5.3.280.0030.03213.61
5.3.270.0030.02413.62
5.3.260.0040.02213.65
5.3.250.0050.01913.56
5.3.240.0050.02913.56
5.3.230.0020.04713.56
5.3.220.0050.02013.59
5.3.210.0010.02413.56
5.3.200.0050.02613.58
5.3.190.0000.02813.59
5.3.180.0000.02613.57
5.3.170.0050.02013.58
5.3.160.0050.01913.62
5.3.150.0080.01613.63
5.3.140.0030.02413.63
5.3.130.0030.02313.56
5.3.120.0020.02413.59
5.3.110.0050.02413.56
5.3.100.0050.02113.56
5.3.90.0020.02113.56
5.3.80.0020.02513.56
5.3.70.0040.02213.56
5.3.60.0060.02013.56
5.3.50.0030.01913.56
5.3.40.0030.02113.56
5.3.30.0030.02313.56
5.3.20.0020.02513.56
5.3.10.0040.02013.56
5.3.00.0020.02313.56
5.2.170.0030.03114.80
5.2.160.0030.02714.80
5.2.150.0040.02914.80
5.2.140.0070.02914.80
5.2.130.0100.02614.80
5.2.120.0000.03914.80
5.2.110.0030.02914.80
5.2.100.0040.02714.80
5.2.90.0030.02714.80
5.2.80.0000.03114.80
5.2.70.0000.04414.80
5.2.60.0060.03114.80
5.2.50.0030.02914.80
5.2.40.0040.02714.80
5.2.30.0000.04914.80
5.2.20.0030.03314.80
5.2.10.0000.04214.80
5.2.00.0070.02414.80
5.1.60.0000.02714.80
5.1.50.0040.02514.80
5.1.40.0000.02814.80
5.1.30.0040.03214.80
5.1.20.0000.02914.80
5.1.10.0030.03014.80
5.1.00.0000.02914.80
5.0.50.0000.02814.80
5.0.40.0140.01814.80
5.0.30.0070.02914.80
5.0.20.0040.02214.80
5.0.10.0030.01914.80
5.0.00.0000.03514.80
4.4.90.0000.01914.80
4.4.80.0050.01114.80
4.4.70.0000.01914.80
4.4.60.0000.01614.80
4.4.50.0080.00814.80
4.4.40.0030.02414.80
4.4.30.0000.02114.80
4.4.20.0030.01814.80
4.4.10.0000.02014.80
4.4.00.0030.02514.80
4.3.110.0000.01714.80
4.3.100.0000.01714.80
4.3.90.0040.01414.80
4.3.80.0040.02214.80
4.3.70.0000.01814.80
4.3.60.0030.01814.80
4.3.50.0100.02114.80
4.3.40.0000.02614.80
4.3.30.0030.01814.80
4.3.20.0000.02314.80
4.3.10.0000.01714.80
4.3.00.0000.01914.80

preferences:
47.02 ms | 400 KiB | 5 Q