3v4l.org

run code in 300+ PHP versions simultaneously
<?php class user_filter extends php_user_filter { function filter($in, $out, &$consumed, $closing) { while($bucket = stream_bucket_make_writeable($in)) { } fclose($this->stream); } } stream_filter_register('user_filter','user_filter'); $fd = fopen('php://memory','w'); $filter = stream_filter_append($fd, 'user_filter'); echo fwrite($fd, "foo"); echo fread($fd, 3);

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.0170.00318.55
8.3.50.0140.00522.11
8.3.40.0100.01019.09
8.3.30.0130.00719.21
8.3.20.0000.00920.04
8.3.10.0080.00023.52
8.3.00.0000.00819.69
8.2.180.0150.00416.63
8.2.170.0070.00722.96
8.2.160.0130.00020.23
8.2.150.0000.00824.18
8.2.140.0120.00324.66
8.2.130.0040.00426.16
8.2.120.0060.00620.89
8.2.110.0100.00019.27
8.2.100.0000.01217.91
8.2.90.0030.00619.21
8.2.80.0000.00917.97
8.2.70.0040.00417.63
8.2.60.0080.00317.78
8.2.50.0050.00318.07
8.2.40.0050.00318.21
8.2.30.0040.00418.24
8.2.20.0030.00517.74
8.2.10.0040.00417.88
8.2.00.0040.00417.67
8.1.280.0070.01025.92
8.1.270.0080.00023.96
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.00922.06
8.1.230.0040.00718.86
8.1.220.0000.00717.74
8.1.210.0000.00818.77
8.1.200.0090.00017.38
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0090.00018.56
8.1.160.0050.00221.93
8.1.150.0040.00418.81
8.1.140.0040.00417.36
8.1.130.0090.00017.82
8.1.120.0040.00417.44
8.1.110.0000.00817.33
8.1.100.0050.00217.41
8.1.90.0050.00317.30
8.1.80.0000.00717.39
8.1.70.0000.00717.37
8.1.60.0000.00917.61
8.1.50.0030.00617.55
8.1.40.0090.00017.53
8.1.30.0030.00617.73
8.1.20.0080.00017.65
8.1.10.0080.00017.57
8.1.00.0040.00417.54
8.0.300.0080.00018.77
8.0.290.0040.00416.88
8.0.280.0030.00318.52
8.0.270.0080.00017.28
8.0.260.0040.00417.33
8.0.250.0050.00317.06
8.0.240.0030.00317.04
8.0.230.0040.00416.91
8.0.220.0050.00317.04
8.0.210.0070.00016.94
8.0.200.0030.00317.04
8.0.190.0030.00716.95
8.0.180.0030.00716.98
8.0.170.0030.00617.00
8.0.160.0000.00716.99
8.0.150.0000.00716.93
8.0.140.0040.00416.93
8.0.130.0030.00313.41
8.0.120.0030.00616.98
8.0.110.0000.00716.83
8.0.100.0040.00417.02
8.0.90.0000.00716.87
8.0.80.0170.00316.79
8.0.70.0000.00716.91
8.0.60.0030.00316.90
8.0.50.0040.00416.90
8.0.30.0130.00517.13
8.0.20.0140.00717.40
8.0.10.0000.00716.88
8.0.00.0070.01016.85
7.4.330.0020.00215.01
7.4.320.0040.00416.46
7.4.300.0030.00316.55
7.4.290.0030.00316.50
7.4.280.0070.00416.60
7.4.270.0000.00716.61
7.4.260.0000.00716.43
7.4.250.0080.00016.38
7.4.240.0030.00316.43
7.4.230.0000.00616.39
7.4.220.0070.01416.53
7.4.210.0000.01416.56
7.4.200.0030.00616.58
7.4.160.0060.00916.67
7.4.150.0100.00717.40
7.4.140.0050.01217.86
7.4.130.0070.01216.45
7.4.120.0100.01116.63
7.4.110.0070.01316.51
7.4.100.0090.00616.53
7.4.90.0070.01116.48
7.4.80.0130.01019.39
7.4.70.0110.00716.63
7.4.60.0030.01316.47
7.4.50.0040.00416.66
7.4.40.0040.01216.64
7.4.30.0110.00616.43
7.4.00.0070.01014.77
7.3.330.0030.00513.34
7.3.320.0020.00213.17
7.3.310.0000.00716.35
7.3.300.0000.00716.17
7.3.290.0100.00316.43
7.3.280.0080.00816.39
7.3.270.0030.01417.40
7.3.260.0110.00716.30
7.3.250.0130.00416.43
7.3.240.0160.00016.49
7.3.230.0130.00316.39
7.3.210.0090.00916.28
7.3.200.0160.00619.39
7.3.190.0120.00416.49
7.3.180.0140.01116.55
7.3.170.0090.01316.35
7.3.160.0120.00616.53
7.3.120.0030.01114.77
7.2.330.0110.00716.38
7.2.320.0100.01316.71
7.2.310.0070.01016.70
7.2.300.0130.00516.50
7.2.290.0130.00316.70
7.2.60.0060.00917.00
7.2.00.0080.00819.55
7.1.200.0040.00815.56
7.1.100.0080.00818.04
7.1.70.0040.00416.88
7.1.60.0100.01419.70
7.1.50.0130.00716.90
7.1.00.0000.08022.45
7.0.200.0030.00516.62
7.0.140.0030.07322.02
7.0.60.0000.04719.93
7.0.50.0070.03717.86
7.0.40.0070.04020.18
7.0.30.0370.06020.06
7.0.20.0230.08320.07
7.0.10.0130.08320.33
7.0.00.0100.04720.17
5.6.280.0070.06720.93
5.6.210.0030.04020.73
5.6.200.0070.07018.11
5.6.190.0030.04320.50
5.6.180.0270.08020.39
5.6.170.0170.05720.43
5.6.160.0070.04720.31
5.6.150.0070.07718.13
5.6.140.0000.05318.14
5.6.130.0100.07718.23
5.6.120.0030.04021.02
5.6.110.0130.03321.03
5.6.100.0100.04020.97
5.6.90.0100.07020.98
5.6.80.0030.06020.42
5.5.350.0030.06720.40
5.5.340.0070.03718.00
5.5.330.0000.07020.27
5.5.320.0300.05320.20
5.5.310.0170.04019.96
5.5.300.0100.07017.93
5.5.290.0030.04318.03
5.5.280.0100.05020.73
5.5.270.0000.04320.89
5.5.260.0070.08320.88
5.5.250.0130.05720.68
5.5.240.3430.04720.16
5.4.450.0200.05719.37
5.4.440.0400.04719.34
5.4.430.0370.04319.11
5.4.420.1130.03719.39
5.4.410.0330.04319.13
5.4.400.0200.04018.94
5.4.390.0270.04019.07
5.4.380.0100.05718.68
5.4.370.0130.05018.68
5.4.360.0170.04318.59
5.4.350.0030.07318.68
5.4.340.0070.06318.73
5.4.320.0040.03912.50
5.4.310.0050.03812.50
5.4.300.0040.03712.50
5.4.290.0060.03712.50
5.4.280.0070.04212.39
5.4.270.0050.03612.39
5.4.260.0070.03812.39
5.4.250.0040.03912.40
5.4.240.0040.03612.39
5.4.230.0050.03712.39
5.4.220.0050.03612.39
5.4.210.0050.03612.39
5.4.200.0060.03712.39
5.4.190.0040.04212.38
5.4.180.0050.03512.38
5.4.170.0080.03912.39
5.4.160.0070.03412.39
5.4.150.0050.03712.38
5.4.140.0070.03612.07
5.4.130.0080.03412.06
5.4.120.0100.03612.01
5.4.110.0050.03612.01
5.4.100.0050.03512.01
5.4.90.0030.03912.02
5.4.80.0070.03412.02
5.4.70.0050.03512.01
5.4.60.0060.03512.01
5.4.50.0070.03312.01
5.4.40.0040.03712.00
5.4.30.0080.03512.00
5.4.20.0110.02911.99
5.4.10.0070.03212.00
5.4.00.0050.03511.48
5.3.290.0090.03812.80
5.3.280.0060.03812.71
5.3.270.0110.04012.73
5.3.260.0100.03912.72
5.3.250.0120.03812.72
5.3.240.0080.04812.72
5.3.230.0050.03912.71
5.3.220.0050.03812.68
5.3.210.0090.03712.68
5.3.200.0070.03512.68
5.3.190.0070.03612.68
5.3.180.0060.03712.67
5.3.170.0060.03712.67
5.3.160.0060.04812.67
5.3.150.0060.03812.67
5.3.140.0050.04012.66
5.3.130.0070.03812.66
5.3.120.0070.03812.66
5.3.110.0070.03812.66
5.3.100.0070.04512.12
5.3.90.0100.03712.10
5.3.80.0090.03412.09
5.3.70.0090.03412.09
5.3.60.0070.03612.08
5.3.50.0050.04112.02
5.3.40.0060.03812.02
5.3.30.0060.03611.98
5.3.20.0040.03711.77
5.3.10.0100.03111.73
5.3.00.0050.04711.71
5.2.170.0070.0319.22
5.2.160.0040.0319.22
5.2.150.0020.0349.22
5.2.140.0060.0299.21
5.2.130.0060.0319.18
5.2.120.0060.0279.18
5.2.110.0040.0299.18
5.2.100.0040.0299.18
5.2.90.0040.0299.19
5.2.80.0090.0269.18
5.2.70.0060.0329.18
5.2.60.0060.0289.13
5.2.50.0050.0299.09
5.2.40.0040.0309.07
5.2.30.0060.0289.05
5.2.20.0090.0239.04
5.2.10.0080.0248.95
5.2.00.0050.0298.81
5.1.60.0050.0238.09
5.1.50.0050.0248.08
5.1.40.0050.0238.07
5.1.30.0070.0238.42
5.1.20.0050.0268.45
5.1.10.0060.0318.17
5.1.00.0040.0268.17
5.0.50.0040.0236.65
5.0.40.0040.0246.50
5.0.30.0060.0336.32
5.0.20.0050.0196.28
5.0.10.0030.0206.26
5.0.00.0050.0296.25
4.4.90.0030.0154.77
4.4.80.0020.0164.76
4.4.70.0030.0194.76
4.4.60.0030.0154.76
4.4.50.0030.0154.77
4.4.40.0020.0254.71
4.4.30.0030.0154.76
4.4.20.0010.0174.84
4.4.10.0030.0154.85
4.4.00.0020.0304.75
4.3.110.0000.0194.66
4.3.100.0010.0174.66
4.3.90.0020.0154.63
4.3.80.0010.0254.58
4.3.70.0010.0204.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0050.0214.53
4.3.30.0010.0173.30
4.3.20.0020.0153.28
4.3.10.0000.0173.24
4.3.00.0200.01014.59

preferences:
51.2 ms | 400 KiB | 5 Q