3v4l.org

run code in 200+ php & hhvm versions
<?php $x = 'test'; $z = 'w'; function char($char) {return $char;} echo "this is a ${trim(' '.++$z.char(' '))}";

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.60.0060.00614.52
7.3.50.0090.00814.66
7.3.40.0080.00814.64
7.3.30.0090.00714.65
7.3.20.0150.00815.17
7.3.10.0150.00715.19
7.3.00.0160.00815.12
7.2.190.0080.00614.80
7.2.180.0080.00814.88
7.2.170.0080.00714.96
7.2.160.0080.00814.89
7.2.150.0130.00815.50
7.2.140.0120.00815.54
7.2.130.0110.00815.49
7.2.120.0110.00715.53
7.2.110.0150.00815.45
7.2.100.0250.00715.50
7.2.90.0140.00715.53
7.2.80.0180.00915.41
7.2.70.0150.00815.50
7.2.60.0150.00815.51
7.2.50.0130.00915.49
7.2.40.0160.00615.52
7.2.30.0130.00615.54
7.2.20.0120.00915.54
7.2.10.0130.00815.49
7.2.00.0120.00815.49
7.1.300.0110.00614.46
7.1.290.0140.00514.63
7.1.280.0100.00814.31
7.1.270.0120.00714.30
7.1.260.0120.00714.27
7.1.250.0150.00714.38
7.1.240.0160.01114.26
7.1.230.0150.01214.36
7.1.220.0150.00814.28
7.1.210.0180.00414.24
7.1.200.0130.00914.27
7.1.190.0180.00814.37
7.1.180.0180.01014.16
7.1.170.0180.00814.25
7.1.160.0140.00914.30
7.1.150.0190.01314.25
7.1.140.0150.00914.32
7.1.130.0180.01014.17
7.1.120.0170.01314.13
7.1.110.0200.00814.43
7.1.100.0130.01414.18
7.1.90.0570.00714.24
7.1.80.0200.00814.33
7.1.70.0650.00514.30
7.1.60.0140.00914.31
7.1.50.0200.00514.23
7.1.40.0170.00414.32
7.1.30.0170.01114.39
7.1.20.0200.00514.29
7.1.10.0150.00814.17
7.1.00.0190.00714.33
7.0.330.0400.00413.90
7.0.320.0350.00613.92
7.0.310.0210.00813.89
7.0.300.0190.00913.69
7.0.290.0200.00713.83
7.0.280.0160.01113.90
7.0.270.0120.01113.81
7.0.260.0190.00913.74
7.0.250.0140.00713.93
7.0.240.0150.01113.96
7.0.230.0110.01013.97
7.0.220.0130.00913.92
7.0.210.0170.00513.93
7.0.200.0120.00913.82
7.0.190.0110.00813.80
7.0.180.0170.00713.88
7.0.170.0160.00914.02
7.0.160.0150.00714.08
7.0.150.0180.00813.92
7.0.140.0170.00713.88
7.0.130.0120.00513.95
7.0.120.0160.00613.99
7.0.110.0110.00913.88
7.0.100.0180.00813.97
7.0.90.0150.00913.92
7.0.80.0130.01113.91
7.0.70.0120.01113.97
7.0.60.0190.00713.87
7.0.50.0170.00814.00
7.0.40.0170.00914.05
7.0.30.0150.00813.99
7.0.20.0180.00714.00
7.0.10.0150.00714.03
7.0.00.0840.00513.97
hhvm-3.22.00.1410.17390.32
hhvm-3.21.30.1390.16689.03
hhvm-3.21.00.1140.18989.13
hhvm-3.20.20.1000.17989.35
hhvm-3.19.20.1290.18488.53
hhvm-3.18.50.1280.18287.03
hhvm-3.18.40.1140.16787.24
hhvm-3.17.30.1180.17286.09
hhvm-3.15.40.1100.13884.17
hhvm-3.13.20.1260.17395.49
hhvm-3.12.140.1160.15694.45
hhvm-3.11.10.1310.16086.39
hhvm-3.10.10.1260.16783.35
5.6.400.0140.01114.30
5.6.390.0180.00714.39
5.6.380.0110.00914.30
5.6.370.0150.00914.26
5.6.360.0110.00914.35
5.6.350.0080.01414.16
5.6.340.0130.01314.44
5.6.330.0170.00914.26
5.6.320.0140.00514.32
5.6.310.0190.00814.24
5.6.300.0140.00714.51
5.6.290.0110.01114.34
5.6.280.0140.01114.29
5.6.270.0150.01014.19
5.6.260.0120.01514.27
5.6.250.0160.00714.32
5.6.240.0110.01114.24
5.6.230.0140.00914.30
5.6.220.0130.01014.40
5.6.210.0140.01114.37
5.6.200.0110.01114.35
5.6.190.0150.00714.22
5.6.180.0150.00814.25
5.6.170.0160.00814.37
5.6.160.0130.01014.31
5.6.150.0100.01514.18
5.6.140.0190.00814.34
5.6.130.0170.00714.25
5.6.120.0170.01014.21
5.6.110.0140.01014.32
5.6.100.0150.00614.23
5.6.90.0130.01014.30
5.6.80.0120.01014.20
5.6.70.0140.01014.19
5.6.60.0150.01014.20
5.6.50.0130.00814.30
5.6.40.0140.00814.22
5.6.30.0110.00814.15
5.6.20.0110.00914.08
5.6.10.0170.00714.26
5.6.00.0150.01214.20
5.5.380.0150.00814.10
5.5.370.0150.00614.16
5.5.360.0160.00814.29
5.5.350.0130.01214.13
5.5.340.0170.00514.28
5.5.330.0140.00814.18
5.5.320.0170.01014.33
5.5.310.0150.01114.25
5.5.300.0150.01014.37
5.5.290.0120.01014.03
5.5.280.0170.01114.32
5.5.270.0140.00814.12
5.5.260.0060.01414.17
5.5.250.0110.00814.15
5.5.240.0150.00814.25
5.5.230.0160.00914.03
5.5.220.0120.01014.13
5.5.210.0170.00514.15
5.5.200.0120.00914.40
5.5.190.0140.00814.25
5.5.180.0170.00814.21
5.5.170.0140.01114.04
5.5.160.0110.01114.23
5.5.150.0130.00914.15
5.5.140.0120.01314.15
5.5.130.0150.00714.22
5.5.120.0100.00714.19
5.5.110.0100.01014.17
5.5.100.0130.00714.19
5.5.90.0090.00714.15
5.5.80.0150.00714.03
5.5.70.0140.01314.19
5.5.60.0110.01114.15
5.5.50.0110.01114.21
5.5.40.0140.00914.17
5.5.30.0130.01014.15
5.5.20.0100.01014.22
5.5.10.0140.00614.10
5.5.00.0140.00814.08
5.4.450.0080.00711.07
5.4.440.0130.00511.12
5.4.430.0100.00411.11
5.4.420.0110.00911.13
5.4.410.0110.00611.19
5.4.400.0120.00711.12
5.4.390.0110.00811.19
5.4.380.0060.00811.11
5.4.370.0120.00511.13
5.4.360.0110.00311.05
5.4.350.0090.00711.10
5.4.340.0110.00611.13
5.4.330.0090.00711.09
5.4.320.0080.00611.11
5.4.310.0090.00611.12
5.4.300.0110.00411.15
5.4.290.0080.00611.13
5.4.280.0120.00511.11
5.4.270.0120.00211.09
5.4.260.0100.00311.07
5.4.250.0060.00711.14
5.4.240.0100.00511.09
5.4.230.0120.00511.19
5.4.220.0090.00611.19
5.4.210.0080.00811.13
5.4.200.0100.00611.18
5.4.190.0090.00611.08
5.4.180.0070.00911.10
5.4.170.0120.00611.11
5.4.160.0130.00311.06
5.4.150.0130.00611.10
5.4.140.0110.00411.20
5.4.130.0110.00711.13
5.4.120.0060.00911.15
5.4.110.0080.00811.13
5.4.100.0090.00411.16
5.4.90.0100.00611.13
5.4.80.0080.00611.14
5.4.70.0100.00611.16
5.4.60.0070.00911.08
5.4.50.0080.00511.17
5.4.40.0090.00611.12
5.4.30.0110.00511.17
5.4.20.0120.00711.18
5.4.10.0110.00611.13
5.4.00.0100.00611.16
5.3.290.0090.00711.05
5.3.280.0090.00611.05
5.3.270.0100.00211.05
5.3.260.0090.00611.05
5.3.250.0090.00611.05
5.3.240.0090.00711.05
5.3.230.0110.00311.05
5.3.220.0080.00611.05
5.3.210.0080.00811.05
5.3.200.0100.00611.05
5.3.190.0090.00411.05
5.3.180.0100.00511.05
5.3.170.0100.00411.05
5.3.160.0100.00211.05
5.3.150.0070.00611.06
5.3.140.0090.00811.05
5.3.130.0080.00711.05
5.3.120.0080.00711.05
5.3.110.0100.00411.05
5.3.100.0080.00911.05
5.3.90.0080.00711.05
5.3.80.0080.00511.05
5.3.70.0090.00511.05
5.3.60.0090.00411.05
5.3.50.0070.00811.05
5.3.40.0110.00211.05
5.3.30.0100.00511.05
5.3.20.0050.00711.05
5.3.10.0090.00511.05
5.3.00.0080.00511.05
5.2.170.0050.00611.05
5.2.160.0050.00511.05
5.2.150.0050.00511.05
5.2.140.0080.00411.05
5.2.130.0090.00411.05
5.2.120.0090.00511.05
5.2.110.0070.00311.05
5.2.100.0080.00411.05
5.2.90.0040.00811.05
5.2.80.0070.00411.05
5.2.70.0060.00611.05
5.2.60.0060.00511.05
5.2.50.0060.00511.05
5.2.40.0060.00511.05
5.2.30.0070.00411.05
5.2.20.0070.00411.05
5.2.10.0060.00611.05
5.2.00.0080.00511.05
5.1.60.0050.00411.05
5.1.50.0100.00211.05
5.1.40.0050.00611.05
5.1.30.0070.00411.05
5.1.20.0070.00311.05
5.1.10.0030.00511.05
5.1.00.0070.00111.05
5.0.50.0080.00211.05
5.0.40.0060.00311.05
5.0.30.0050.00511.05
5.0.20.0040.00311.05
5.0.10.0060.00211.05
5.0.00.0070.00311.05
4.4.90.0060.00111.05
4.4.80.0070.00111.05
4.4.70.0050.00311.05
4.4.60.0050.00311.05
4.4.50.0040.00311.05
4.4.40.0060.00211.05
4.4.30.0050.00311.05
4.4.20.0050.00311.05
4.4.10.0030.00311.05
4.4.00.0060.00211.05
4.3.110.0030.00611.05
4.3.100.0030.00711.05
4.3.90.0040.00411.05
4.3.80.0050.00311.05
4.3.70.0040.00611.05
4.3.60.0050.00311.05
4.3.50.0050.00211.05
4.3.40.0040.00311.05
4.3.30.0030.00411.05
4.3.20.0020.00511.05
4.3.10.0030.00311.05
4.3.00.0030.00311.05