3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class MyCharacter { /* some stuff here */ } class MyString { public function __construct(MyCharacter $char, array $type, int $foo, $bar) { /* do something useful here */ } } $method = new ReflectionMethod('MyString', '__construct'); foreach ($method->getParameters() as $param) { echo "Type hint for ".$param->getName()." is ".$param->getClass().".\r\n"; } ?>
based on uTYsM

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.2.60.0000.01616.67
7.2.00.0030.01019.48
7.1.200.0000.01315.34
7.1.100.0000.01018.11
7.1.70.0000.01216.97
7.1.60.0110.01419.12
7.1.50.0090.00616.82
7.1.00.0000.08022.45
7.0.200.0290.00714.80
7.0.60.0170.07719.96
7.0.50.0130.07017.89
7.0.40.0100.09020.08
7.0.30.0200.04720.23
7.0.20.0170.05720.26
7.0.10.0030.04320.03
7.0.00.0130.07720.19
5.6.280.0070.05721.13
5.6.210.0100.07320.53
5.6.200.0070.07318.18
5.6.190.0070.05720.39
5.6.180.0570.07320.64
5.6.170.0300.08020.55
5.6.160.0100.06720.50
5.6.150.0070.06318.19
5.6.140.0030.05018.22
5.6.130.0070.07018.18
5.6.120.0070.05320.99
5.6.110.0100.08321.01
5.6.100.0130.07720.98
5.6.90.0030.08321.04
5.6.80.0030.03720.39
5.5.350.4100.03320.53
5.5.340.0030.04717.98
5.5.330.0000.05320.42
5.5.320.0330.06720.31
5.5.310.0230.07020.27
5.5.300.0100.08318.07
5.5.290.0100.05717.95
5.5.280.0030.07720.86
5.5.270.0200.05320.66
5.5.260.0200.07320.77
5.5.250.0070.09020.59
5.5.240.0000.08320.37
5.4.450.0670.05319.55
5.4.440.1000.05019.31
5.4.430.0930.05719.58
5.4.420.0830.05719.46
5.4.410.1030.06319.46
5.4.400.0800.06019.29
5.4.390.1030.06019.01
5.4.380.0930.06019.26
5.4.370.0730.06019.30
5.4.360.0630.06319.29
5.4.350.1000.04718.84
5.4.340.0770.06318.84
5.4.320.0930.05318.98
5.4.310.0870.04718.87
5.4.300.0870.06019.20
5.4.290.0730.07319.28
5.4.280.0900.06019.30
5.4.270.0770.06019.30
5.4.260.0930.07319.30
5.4.250.1030.08318.84
5.4.240.1130.06019.05
5.4.230.0830.05319.15
5.4.220.0830.06019.14
5.4.210.0800.06719.26
5.4.200.0970.05716.89
5.4.190.0930.03719.10
5.4.180.0900.04319.13
5.4.170.0900.05319.30
5.4.160.1100.04719.04
5.4.150.0900.05719.30
5.4.140.0830.05316.58
5.4.130.0870.04716.61
5.4.120.0870.05016.53
5.4.110.0930.05716.55
5.4.100.1070.04716.41
5.4.90.1030.07716.53
5.4.80.1100.06316.42
5.4.70.1170.05016.50
5.4.60.0900.05016.34
5.4.50.0870.05316.54
5.4.40.0930.04716.37
5.4.30.1100.05016.26
5.4.20.1100.05716.48
5.4.10.0870.04016.48
5.4.00.1130.05315.82
5.3.290.1170.07014.72
5.3.280.1100.06714.74
5.3.270.0930.07014.84
5.3.260.0670.06714.66
5.3.250.0900.05314.59
5.3.240.0930.05714.62
5.3.230.1000.06314.59
5.3.220.0870.05714.62
5.3.210.0670.06014.62
5.3.200.0700.05014.62
5.3.190.0730.06714.56
5.3.180.0870.05314.46
5.3.170.0870.08314.48
5.3.160.0770.04314.65
5.3.150.0900.04714.62
5.3.140.0770.05314.59
5.3.130.0800.06014.60
5.3.120.0770.07014.54
5.3.110.0770.06014.57
5.3.100.0700.06014.11
5.3.90.0900.04314.10
5.3.80.0900.05014.04
5.3.70.0970.05014.27
5.3.60.0830.05014.15
5.3.50.0800.07013.81
5.3.40.1000.07014.01
5.3.30.0900.06313.84
5.3.20.1000.07713.79
5.3.10.0930.04313.88
5.3.00.0830.05313.71
5.2.170.0700.03711.16
5.2.160.0770.04311.20
5.2.150.0730.04311.07
5.2.140.0670.05311.06
5.2.130.0900.03711.03
5.2.120.0600.04011.19
5.2.110.0770.04711.11
5.2.100.0700.04311.04
5.2.90.0800.04011.33
5.2.80.0900.04310.96
5.2.70.1100.05311.01
5.2.60.0570.04311.06
5.2.50.0730.04311.03
5.2.40.0430.04711.00
5.2.30.0470.05011.07
5.2.20.0570.03310.93
5.2.10.0530.03311.09
5.2.00.0630.03010.62
5.1.60.0500.03010.00
5.1.50.0430.0339.98
5.1.40.0300.03310.04
5.1.30.0070.03310.29
5.1.20.0070.03710.22
5.1.10.0070.03310.05
5.1.00.0100.04310.08
5.0.50.0230.0308.42
5.0.40.0300.0338.31
5.0.30.0230.0478.28
5.0.20.0100.0338.43
5.0.10.0200.0338.07
5.0.00.0300.0378.31
4.4.90.0300.0206.07
4.4.80.0030.0206.07
4.4.70.0070.0206.07
4.4.60.0070.0236.07
4.4.50.0030.0276.07
4.4.40.0000.0406.07
4.4.30.0000.0236.07
4.4.20.0070.0206.07
4.4.10.0130.0276.07
4.4.00.0130.0506.07
4.3.110.0330.0306.07
4.3.100.0300.0206.07
4.3.90.0230.0206.07
4.3.80.0330.0306.07
4.3.70.0330.0176.07
4.3.60.0330.0176.07
4.3.50.0270.0206.07
4.3.40.0230.0376.07
4.3.30.0100.0236.07
4.3.20.0130.0206.07
4.3.10.0170.0176.07
4.3.00.0000.0237.28