3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.0rc40.0330.00398.97
7.3.0rc30.1250.01016.39
7.3.0beta10.0000.00512.80
7.3.0alpha10.0040.00412.65
7.2.60.0110.00016.86
7.1.200.0080.01215.41
7.1.100.0070.00718.28
7.1.70.0130.00016.99
7.1.60.0070.01217.29
7.1.50.0160.00716.94
7.1.40.0070.01116.63
7.1.30.0070.01116.59
7.1.20.0090.00916.79
7.1.10.0140.00016.53
7.1.00.0120.00516.72
7.0.200.0090.00416.67
7.0.190.0080.00416.66
7.0.180.0130.00416.29
7.0.170.0000.01616.43
7.0.160.0110.00716.37
7.0.150.0090.00416.22
7.0.140.0040.01216.40
7.0.130.0120.00216.59
7.0.120.0110.00516.54
7.0.110.0060.01116.40
7.0.100.0110.00616.22
7.0.90.0090.00316.28
7.0.80.0110.00516.45
7.0.70.0100.00516.28
7.0.60.0070.00716.33
7.0.50.0140.00016.46
7.0.40.0100.01314.80
7.0.30.0050.00914.80
7.0.20.0050.00814.80
7.0.10.0080.00514.80
7.0.00.0060.01414.80
hhvm-3.17.30.0410.12199.95
hhvm-3.15.40.0570.111100.32
hhvm-3.13.20.0460.110102.43
hhvm-3.12.140.0470.02578.25
hhvm-3.11.10.0510.112101.61
hhvm-3.10.10.0340.10898.47
5.6.300.0040.04720.93
5.6.290.0100.08321.00
5.6.280.0100.06321.09
5.6.270.0120.05521.05
5.6.260.0030.06320.91
5.6.250.0090.04220.94
5.6.240.0000.07220.90
5.6.230.0000.08720.95
5.6.220.0100.07221.02
5.6.210.0100.05020.96
5.6.200.0120.08021.03
5.6.190.0000.04820.86
5.6.180.0090.04020.93
5.6.170.0070.05820.92
5.6.160.0060.04420.99
5.6.150.0030.07120.92
5.6.140.0100.03920.98
5.6.130.0030.04820.85
5.6.120.0000.05220.98
5.6.110.0150.03521.02
5.6.100.0070.04420.86
5.6.90.0090.03920.80
5.6.80.0000.04520.18
5.6.70.0090.03720.20
5.6.60.0030.04420.30
5.6.50.0030.04320.33
5.6.40.0090.03820.36
5.6.30.0000.07620.18
5.6.20.0030.04820.39
5.6.10.0040.05020.28
5.6.00.0040.06820.18
5.5.380.0100.03317.41
5.5.370.0000.06717.46
5.5.360.0030.06917.55
5.5.350.0060.06117.63
5.5.340.0070.03918.09
5.5.330.0000.04618.08
5.5.320.0000.04418.13
5.5.310.0070.04118.03
5.5.300.0060.06418.00
5.5.290.0030.04918.05
5.5.280.0030.04717.99
5.5.270.0000.05017.98
5.5.260.0030.05517.86
5.5.250.0030.04017.90
5.5.240.0000.04817.08
5.5.230.0030.04017.49
5.5.220.0090.03517.45
5.5.210.0000.06217.47
5.5.200.0030.04817.09
5.5.190.0030.04417.43
5.5.180.0040.04317.18
5.5.160.0000.04417.36
5.5.150.0000.04217.43
5.5.140.0000.05217.38
5.5.130.0000.05417.43
5.5.120.0030.04117.43
5.5.110.0030.03817.37
5.5.100.0060.03517.39
5.5.90.0040.03917.33
5.5.80.0030.04917.08
5.5.70.0070.05917.36
5.5.60.0030.07717.28
5.5.50.0060.03817.32
5.5.40.0100.06517.31
5.5.30.0070.03416.93
5.5.20.0040.04217.27
5.5.10.0000.04617.33
5.5.00.0070.05916.96
5.4.450.0120.03919.49
5.4.440.0060.03819.49
5.4.430.0030.04319.32
5.4.420.0040.03919.29
5.4.410.0000.04419.11
5.4.400.0000.04418.91
5.4.390.0030.04019.02
5.4.380.0030.04119.10
5.4.370.0100.03519.07
5.4.360.0030.06519.10
5.4.350.0000.04319.11
5.4.340.0030.05018.93
5.4.320.0030.03919.13
5.4.310.0030.05319.20
5.4.300.0100.03019.22
5.4.290.0000.04918.97
5.4.280.0070.07218.90
5.4.270.0070.03718.97
5.4.260.0000.04018.97
5.4.250.0030.07619.22
5.4.240.0040.04918.93
5.4.230.0030.04118.93
5.4.220.0030.04118.90
5.4.210.0060.03818.98
5.4.200.0030.03818.96
5.4.190.0000.07119.18
5.4.180.0030.03918.97
5.4.170.0040.03619.14
5.4.160.0000.06618.92
5.4.150.0030.07718.84
5.4.140.0110.04216.78
5.4.130.0030.05616.82
5.4.120.0000.05016.72
5.4.110.0070.03316.78
5.4.100.0060.03216.79
5.4.90.0000.03916.68
5.4.80.0060.06116.74
5.4.70.0000.06816.46
5.4.60.0000.05216.70
5.4.50.0030.04016.70
5.4.40.0030.03516.61
5.4.30.0070.03516.71
5.4.20.0030.07816.59
5.4.10.0060.03716.66
5.4.00.0060.03416.04
5.3.290.0030.04114.80
5.3.280.0030.05514.89
5.3.270.0030.03814.91
5.3.260.0030.04114.96
5.3.250.0030.03914.80
5.3.240.0060.05014.80
5.3.230.0030.08214.80
5.3.220.0070.03214.85
5.3.210.0000.04414.80
5.3.200.0060.04514.82
5.3.190.0000.04614.84
5.3.180.0000.04014.80
5.3.170.0070.03314.84
5.3.160.0070.03614.91
5.3.150.0130.02614.92
5.3.140.0060.03814.92
5.3.130.0030.03714.80
5.3.120.0000.04114.85
5.3.110.0030.04214.80
5.3.100.0040.03914.80
5.3.90.0000.03814.80
5.3.80.0000.04214.80
5.3.70.0040.03614.80
5.3.60.0090.03714.80
5.3.50.0060.03114.80
5.3.40.0030.03514.80
5.3.30.0030.03714.80
5.3.20.0000.04114.80
5.3.10.0000.03914.80
5.3.00.0000.04214.80
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