3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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.60.0000.01416.46
8.3.50.0120.00816.44
8.3.40.0080.01518.78
8.3.30.0090.00618.80
8.3.20.0040.00418.82
8.3.10.0000.00820.57
8.3.00.0030.00619.38
8.2.180.0090.00625.92
8.2.170.0040.01218.95
8.2.160.0030.01021.06
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00819.66
8.2.110.0060.00322.13
8.2.100.0080.00317.72
8.2.90.0060.00317.50
8.2.80.0040.00418.78
8.2.70.0080.00017.63
8.2.60.0040.00417.63
8.2.50.0030.00517.63
8.2.40.0050.00319.43
8.2.30.0040.00417.72
8.2.20.0000.00717.72
8.2.10.0080.00017.80
8.2.00.0070.00417.64
8.1.280.0110.00425.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0070.00320.23
8.1.230.0110.00017.76
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0070.00317.25
8.1.190.0000.00817.35
8.1.180.0060.00318.10
8.1.170.0030.00617.62
8.1.160.0030.00518.94
8.1.150.0000.00718.59
8.1.140.0040.00417.36
8.1.130.0040.00417.70
8.1.120.0000.00717.51
8.1.110.0030.00517.35
8.1.100.0000.00717.44
8.1.90.0030.00317.48
8.1.80.0070.00017.48
8.1.70.0030.00517.38
8.1.60.0000.00717.50
8.1.50.0000.00717.49
8.1.40.0030.00617.51
8.1.30.0050.00217.63
8.1.20.0050.00517.56
8.1.10.0000.00817.60
8.1.00.0000.00717.34
8.0.300.0050.00218.85
8.0.290.0000.00816.75
8.0.280.0060.00318.14
8.0.270.0060.00318.07
8.0.260.0070.00016.89
8.0.250.0000.00716.94
8.0.240.0030.00316.88
8.0.230.0040.00416.95
8.0.220.0050.00316.96
8.0.210.0000.00816.89
8.0.200.0040.00417.03
8.0.190.0000.00716.93
8.0.180.0030.00516.98
8.0.170.0030.00517.01
8.0.160.0070.00016.85
8.0.150.0030.00616.89
8.0.140.0040.00416.81
8.0.130.0040.00413.32
8.0.120.0040.00416.91
8.0.110.0040.00416.83
8.0.100.0040.00416.89
8.0.90.0020.00517.07
8.0.80.0070.01316.96
8.0.70.0070.00016.92
8.0.60.0000.00816.88
8.0.50.0000.00716.89
8.0.30.0070.01217.04
8.0.20.0130.00617.19
8.0.10.0050.00217.14
8.0.00.0140.00516.77
7.4.330.0020.00212.87
7.4.320.0000.00616.55
7.4.300.0000.00716.52
7.4.290.0000.00916.56
7.4.280.0000.00816.43
7.4.270.0030.00316.48
7.4.260.0000.00613.34
7.4.250.0060.00316.51
7.4.240.0030.00316.46
7.4.230.0000.00716.41
7.4.220.0150.00416.66
7.4.210.0040.01116.58
7.4.200.0040.00416.36
7.4.190.0000.00716.62
7.4.160.0040.01116.43
7.4.150.0140.01116.49
7.4.140.0070.01316.60
7.4.130.0100.00816.56
7.4.120.0090.00916.48
7.4.110.0140.00516.64
7.4.100.0170.00316.55
7.4.90.0080.00816.44
7.4.80.0080.00816.49
7.4.70.0070.01016.23
7.4.60.0060.01816.59
7.4.50.0040.00416.47
7.4.40.0060.00616.53
7.4.30.0060.00916.61
7.4.00.0060.01014.93
7.3.330.0030.00313.32
7.3.320.0050.00013.23
7.3.310.0030.00316.26
7.3.300.0040.00416.33
7.3.290.0090.00916.41
7.3.280.0100.00816.35
7.3.270.0040.01416.34
7.3.260.0100.01316.53
7.3.250.0140.00316.36
7.3.240.0120.00616.58
7.3.230.0140.00316.59
7.3.210.0110.00716.28
7.3.200.0090.00919.39
7.3.190.0100.00616.47
7.3.180.0040.01216.32
7.3.170.0130.00416.22
7.3.160.0090.00616.27
7.3.120.0060.00914.92
7.3.110.0070.00714.71
7.3.100.0060.00914.72
7.3.90.0060.00614.75
7.3.80.0030.00915.07
7.3.70.0040.00814.61
7.3.60.0040.01114.49
7.3.50.0070.00715.00
7.3.40.0070.01014.68
7.3.30.0030.00714.97
7.3.20.0040.01216.40
7.3.10.0100.00316.64
7.3.00.0040.01116.68
7.2.330.0100.01016.63
7.2.320.0070.01016.79
7.2.310.0070.01316.51
7.2.300.0030.01316.84
7.2.290.0050.01116.79
7.2.250.0040.01514.89
7.2.240.0070.01315.35
7.2.230.0030.01315.25
7.2.220.0060.00314.95
7.2.210.0000.01215.07
7.2.200.0070.00415.20
7.2.190.0030.00614.93
7.2.180.0060.00915.29
7.2.170.0060.01015.12
7.2.60.0070.00417.07
7.1.330.0030.00616.01
7.1.320.0070.00415.87
7.1.310.0000.01115.77
7.1.300.0070.00316.02
7.1.290.0030.00915.95
7.1.280.0050.00415.85
7.1.270.0030.00615.66
7.1.260.0000.01615.97
7.1.200.0020.00515.76
7.1.70.0100.00317.19
7.1.60.0090.01619.40
7.1.50.0130.01017.11
7.1.00.0100.06722.42
7.0.200.0070.00016.78
7.0.140.0030.07722.01
7.0.120.0030.07322.09
7.0.60.0200.05720.00
7.0.50.0100.08317.85
7.0.40.0030.08720.30
7.0.30.0130.05020.34
7.0.20.0200.08020.22
7.0.10.0070.04720.22
7.0.00.0030.07720.09
5.6.280.0000.07721.13
5.6.210.0030.04020.66
5.6.200.0030.05018.17
5.6.190.0100.05720.77
5.6.180.0130.04320.63
5.6.170.0200.04020.52
5.6.160.0130.07720.48
5.6.150.0070.08318.22
5.6.140.0030.05318.14
5.6.130.0000.04318.14
5.6.120.0030.06720.99
5.6.110.0230.06321.09
5.6.100.0070.07320.89
5.6.90.0000.04720.95
5.6.80.0100.06720.38
5.5.350.0370.06320.33
5.5.340.0070.07017.96
5.5.330.0130.08320.48
5.5.320.0170.04720.52
5.5.310.0230.08020.34
5.5.300.0130.04317.98
5.5.290.0070.07318.07
5.5.280.0170.07320.89
5.5.270.0070.04720.95
5.5.260.0100.08020.68
5.5.250.0100.08320.61
5.5.240.0070.03720.28
5.4.450.0100.04019.18
5.4.440.0030.05019.48
5.4.430.0070.07719.24
5.4.420.0100.06019.29
5.4.410.0100.07019.05
5.4.400.0030.07719.25
5.4.390.0100.05019.25
5.4.380.0200.06319.15
5.4.370.0000.07719.15
5.4.360.0100.06719.17
5.4.350.0070.06318.92
5.4.340.0030.07718.98
5.4.320.0070.08019.24
5.4.310.0100.06718.87
5.4.300.0070.07019.14
5.4.290.0100.07019.14
5.4.280.0100.06018.85
5.4.270.0100.07318.87
5.4.260.0200.06718.85
5.4.250.0030.08319.14
5.4.240.0030.05319.20
5.4.230.0130.07018.84
5.4.220.0070.04719.23
5.4.210.0130.06719.20
5.4.200.0100.07719.15
5.4.190.0070.04319.07
5.4.180.0070.04019.14
5.4.170.0100.03018.84
5.4.160.0030.06019.15
5.4.150.0100.07719.23
5.4.140.0100.04716.52
5.4.130.0130.04316.48
5.4.120.0070.04316.50
5.4.110.0070.03316.51
5.4.100.0070.04016.35
5.4.90.0070.06016.44
5.4.80.0000.04016.47
5.4.70.0070.03316.37
5.4.60.0030.03316.27
5.4.50.0070.03716.62
5.4.40.0030.03716.50
5.4.30.0000.03716.40
5.4.20.0030.03316.36
5.4.10.0000.03716.48
5.4.00.0000.03715.91
5.3.290.0030.08714.66
5.3.280.0100.07714.64
5.3.270.0070.04714.53
5.3.260.0000.05314.68
5.3.250.0000.07014.63
5.3.240.0170.06714.61
5.3.230.0030.08314.61
5.3.220.0030.04014.63
5.3.210.0000.04314.61
5.3.200.0030.04314.60
5.3.190.0100.03314.55
5.3.180.0000.05014.59
5.3.170.0070.04014.55
5.3.160.0070.03314.57
5.3.150.0030.03714.48
5.3.140.0000.04014.71
5.3.130.0030.03714.55
5.3.120.0000.04014.47
5.3.110.0030.03714.70
5.3.100.0070.03314.04
5.3.90.0030.03714.18
5.3.80.0030.04013.97
5.3.70.0030.03714.08
5.3.60.0000.04014.01
5.3.50.0030.03713.92
5.3.40.0030.04013.95
5.3.30.0100.04013.88
5.3.20.0100.03713.64
5.3.10.0030.03313.69
5.3.00.0000.03713.66
5.2.170.0030.03011.30
5.2.160.0000.06311.12
5.2.150.0030.06311.30
5.2.140.0070.02711.07
5.2.130.0000.03011.11
5.2.120.0030.02711.18
5.2.110.0000.05011.16
5.2.100.0000.03011.15
5.2.90.0070.02311.14
5.2.80.0030.02711.07
5.2.70.0000.03311.09
5.2.60.0130.03011.01
5.2.50.0030.03011.18
5.2.40.0100.03311.05
5.2.30.0000.03010.97
5.2.20.0030.02711.01
5.2.10.0030.02710.90
5.2.00.0000.03010.79
5.1.60.0000.02710.06
5.1.50.0000.02710.00
5.1.40.0030.0209.98
5.1.30.0070.02010.34
5.1.20.0000.03010.36
5.1.10.0000.03010.12
5.1.00.0000.02710.09
5.0.50.0000.0208.57
5.0.40.0000.0208.32
5.0.30.0000.0378.28
5.0.20.0000.0208.24
5.0.10.0000.0208.19
5.0.00.0030.0278.16
4.4.90.0000.0177.84
4.4.80.0070.0107.84
4.4.70.0030.0137.84
4.4.60.0000.0137.84
4.4.50.0000.0137.84
4.4.40.0000.0277.84
4.4.30.0000.0177.84
4.4.20.0000.0177.84
4.4.10.0030.0137.84
4.4.00.0000.0237.84
4.3.110.0000.0177.84
4.3.100.0000.0137.84
4.3.90.0000.0137.84
4.3.80.0000.0277.84
4.3.70.0030.0107.84
4.3.60.0000.0137.84
4.3.50.0030.0177.84
4.3.40.0000.0237.84
4.3.30.0000.0277.84
4.3.20.0030.0237.84
4.3.10.0030.0377.84
4.3.00.0000.0377.84

preferences:
45.91 ms | 401 KiB | 5 Q