3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class x { public $a = [ '~.~' => '$this->waa($0);' ]; function __construct($s) { foreach($this->a as $p => $r) { $s = preg_replace_callback($p, function($m) use ($s){ return eval( preg_replace('~\$(\d)~', '$m[$1]', $s) ); }, $s); } return $s; } function waa($t){ return '*'.$t.'*'; } } var_dump(new x('wazup'));
based on BSEgr

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.10.0070.00716.73
7.3.00.0060.00816.85
7.2.130.0050.01117.05
7.2.120.0060.00817.03
7.2.110.0040.01317.03
7.2.100.0100.00517.02
7.2.90.0020.01217.09
7.2.80.0060.00917.00
7.2.70.0090.00517.05
7.2.60.0080.00817.17
7.2.50.0080.00417.14
7.2.40.0090.00617.02
7.2.30.0090.00417.10
7.2.20.0020.01117.01
7.2.10.0050.00716.92
7.2.00.0070.00817.94
7.1.250.0070.00815.97
7.1.240.0070.00716.05
7.1.230.0090.00616.02
7.1.220.0000.01315.96
7.1.210.0030.00915.92
7.1.200.0050.00916.01
7.1.190.0000.01316.07
7.1.180.0040.00916.15
7.1.170.0070.00716.04
7.1.160.0000.01415.90
7.1.150.0030.01015.77
7.1.140.0060.00316.03
7.1.130.0000.01415.91
7.1.120.0070.00715.86
7.1.110.0070.00715.94
7.1.100.0850.00516.36
7.1.90.0070.00715.82
7.1.80.0080.00816.05
7.1.70.0060.00616.65
7.1.60.0090.00917.57
7.1.50.0080.01016.69
7.1.40.0100.00715.89
7.1.30.0090.00415.95
7.1.20.0060.00615.70
7.1.10.0070.01015.81
7.1.00.0070.03919.15
7.0.330.0070.00715.26
7.0.320.0040.01115.28
7.0.310.0080.00415.60
7.0.300.0100.00715.37
7.0.290.0090.00315.12
7.0.280.0000.01015.52
7.0.270.0080.00315.59
7.0.260.0100.00315.66
7.0.250.0100.00615.58
7.0.240.0100.00315.22
7.0.230.0030.00615.48
7.0.220.0070.00715.75
7.0.210.0060.00315.56
7.0.200.0060.00416.20
7.0.190.0070.00315.37
7.0.180.0040.00415.61
7.0.170.0090.00615.71
7.0.160.0040.00815.65
7.0.150.0040.00815.61
7.0.140.0000.00815.61
7.0.130.0080.00015.61
7.0.120.0060.00915.46
7.0.110.0000.01315.66
7.0.100.0060.00615.70
7.0.90.0030.01015.61
7.0.80.0000.01315.57
7.0.70.0090.00315.52
7.0.60.0030.02518.64
7.0.50.0050.04516.66
7.0.40.0090.02417.05
7.0.30.0130.02317.02
7.0.20.0200.04116.79
7.0.10.0100.03616.97
7.0.00.0120.04216.82
5.6.380.0120.00314.32
5.6.370.0030.01314.60
5.6.360.0050.00514.64
5.6.350.0040.00714.56
5.6.340.0030.00914.38
5.6.330.0030.01414.63
5.6.320.0000.01114.54
5.6.310.0070.01114.55
5.6.300.0030.00614.27
5.6.290.0030.01014.35
5.6.280.0090.02817.81
5.6.270.0060.00914.59
5.6.260.0000.00914.29
5.6.250.0060.00314.61
5.6.240.0030.01014.31
5.6.230.0100.00314.01
5.6.220.0060.00914.55
5.6.210.0080.03617.52
5.6.200.0120.04016.42
5.6.190.0000.02717.26
5.6.180.0130.02817.46
5.6.170.0230.04117.43
5.6.160.0030.03017.41
5.6.150.0050.03916.09
5.6.140.0050.04916.32
5.6.130.0100.02816.27
5.6.120.0070.04417.86
5.6.110.0030.02617.78
5.6.100.0130.03817.59
5.6.90.0050.02617.56
5.6.80.0080.03517.29
5.6.70.0040.00714.41
5.6.60.0000.01314.36
5.6.50.0080.00414.50
5.6.40.0070.01014.54
5.6.30.0060.00614.32
5.6.20.0030.00914.28
5.6.10.0090.00313.95
5.6.00.0080.00614.21
5.5.380.0070.00711.64
5.5.370.0030.00711.64
5.5.360.0040.00711.64
5.5.350.2100.02515.99
5.5.340.0050.02514.81
5.5.330.0030.03015.95
5.5.320.0150.04015.92
5.5.310.0160.01515.94
5.5.300.0080.04214.81
5.5.290.0130.02814.81
5.5.280.0090.02816.26
5.5.270.0050.02516.21
5.5.260.0160.03316.15
5.5.250.0080.02616.18
5.5.240.0130.04115.92
5.5.230.0090.00311.64
5.5.220.0000.01211.64
5.5.210.0090.00311.64
5.5.200.0060.00011.64
5.5.190.0030.00711.64
5.5.180.0070.00311.64
5.5.170.0000.00811.64
5.5.160.0080.00011.64
5.5.150.0000.01011.64
5.5.140.0080.00511.64
5.5.130.0080.00011.64
5.5.120.0060.00011.64
5.5.110.0080.00311.64
5.5.100.0040.00711.64
5.5.90.0040.00411.64
5.5.80.0030.00711.64
5.5.70.0040.00711.64
5.5.60.0100.00011.64
5.5.50.0060.00611.64
5.5.40.0000.01111.64
5.5.30.0000.01111.64
5.5.20.0060.00611.64
5.5.10.0080.00411.64
5.5.00.0030.00711.64
5.4.450.0030.07319.59
5.4.440.0170.05319.26
5.4.430.0170.05319.57
5.4.420.0230.05719.56
5.4.410.0200.05319.32
5.4.400.0170.05719.11
5.4.390.0300.05319.13
5.4.380.0200.05019.20
5.4.370.0170.05719.11
5.4.360.0130.06019.20
5.4.350.0130.05719.09
5.4.340.0070.06019.29
5.4.320.0200.05019.19
5.4.310.0270.05319.20
5.4.300.0200.05018.95
5.4.290.0100.06019.11
5.4.280.0170.05719.21
5.4.270.0270.04319.17
5.4.260.0230.04719.16
5.4.250.0370.04319.23
5.4.240.0100.05719.10
5.4.230.0170.05318.94
5.4.220.0130.05719.13
5.4.210.0170.05319.21
5.4.200.0100.05019.19
5.4.190.0270.04018.92
5.4.180.0230.04719.29
5.4.170.0030.06318.98
5.4.160.0130.05718.93
5.4.150.0130.06019.29
5.4.140.0200.05316.43
5.4.130.0100.08016.53
5.4.120.0200.04716.43
5.4.110.0130.06316.55
5.3.290.0170.05314.67
5.3.280.0230.04714.59
5.3.270.0170.05314.56
5.3.260.0200.04714.63
5.3.250.0300.05014.61
5.3.240.0200.06314.63
5.3.230.0130.05314.56
5.3.220.0200.06014.59
5.3.210.0230.07014.48