3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php register_shutdown_function('shutdownFunction'); function shutDownFunction() { $error = error_get_last(); if ($error['type'] == 1) { //do your stuff } } final class valueobjectEmail { const EMAIL = "me@where.com"; static $p = "me@here.com"; // can't unset static property private $pp = "me@there.org"; // but may unset ppp properties function getProp(){ return valueobjectEmail::$p; } function setProp(){ valueobjectEmail::$p = 'blee'; } function getPropPP(){ return $this->pp; } function UnsetPP() { unset($this->pp); } private function __destruct() { return false; } } $vo = new valueobjectEmail; var_dump($vo); echo $vo->getProp(),"\n"; $vo->setProp(); echo $vo->getProp(),"\n"; $vo2 = new valueobjectEmail; echo $vo == $vo2,"\n"; echo $vo === $vo2,"\n"; echo "\n",$vo2->getPropPP(),"\n"; $vo2->UnsetPP(); var_dump($vo2); echo $vo::EMAIL,"\n"; try { $vo = null; } catch(Exception $e) { } finally { echo "You may not destroy the value object","\n"; } var_dump($vo);
based on KaoGl

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.0060.00698.97
7.3.0rc30.0090.00916.74
7.3.0beta10.0000.01112.91
7.3.0alpha10.0000.01012.41
7.2.60.0070.01016.82
7.1.200.0040.01115.91
7.1.100.0030.00618.06
7.1.70.0090.00017.21
7.1.60.0070.01819.32
7.1.50.0140.01016.63
7.1.00.0030.07722.54
7.0.200.0050.00516.86
7.0.140.0070.07022.18
7.0.60.0030.07320.08
7.0.50.0030.08317.92
7.0.40.0100.07720.20
7.0.30.0270.04720.26
7.0.20.0370.07020.05
7.0.10.0330.06320.24
7.0.00.0130.07020.32
5.6.280.0100.06721.14
5.6.210.0100.07320.48
5.6.200.0100.08018.16
5.6.190.0070.07020.46
5.6.180.0270.04020.50
5.6.170.0200.05720.47
5.6.160.0000.04320.47
5.6.150.0070.04318.14
5.6.140.0130.06018.18
5.6.130.0070.08018.21
5.6.120.0230.07021.04
5.6.110.0130.06020.97
5.6.100.0070.05020.89
5.6.90.0100.08721.01
5.6.80.0130.07320.36
5.6.70.4270.04020.44
5.5.350.0100.08320.50
5.5.340.0070.03717.93
5.5.330.0030.09020.31
5.5.320.0370.05320.36
5.5.310.0330.07720.23
5.5.300.0070.06717.95
5.5.290.0000.09017.95
5.5.280.0130.07720.81
5.5.270.0000.06020.88
5.5.260.0070.08020.67
5.5.250.0130.07320.71
5.5.240.0300.05720.13
5.4.450.1030.04719.32
5.4.440.1030.04719.59
5.4.430.0900.06019.16
5.4.420.0630.00019.38
5.4.410.0670.00019.32
5.4.400.0630.00019.16
5.4.390.0800.00019.11
5.4.380.0670.00019.07
5.4.370.0630.00019.07
5.4.360.0800.00019.16
5.4.350.0630.00019.26
5.4.340.0600.00019.16
5.4.320.0080.03812.53
5.4.310.0030.04012.53
5.4.300.0040.03912.53
5.4.290.0060.03812.52
5.4.280.0050.03612.42
5.4.270.0080.03312.42
5.4.260.0070.03612.42
5.4.250.0080.03512.42
5.4.240.0050.03712.42
5.4.230.0050.03812.41
5.4.220.0070.03512.41
5.4.210.0020.03812.41
5.4.200.0060.03712.41
5.4.190.0050.03612.41
5.4.180.0050.03912.41
5.4.170.0070.03712.41
5.4.160.0050.03612.41
5.4.150.0050.03612.41
5.4.140.0080.03412.10
5.4.130.0070.03312.07
5.4.120.0040.03612.04
5.4.110.0060.03512.04
5.4.100.0060.03412.04
5.4.90.0060.03612.04
5.4.80.0070.03512.04
5.4.70.0050.03512.04
5.4.60.0040.03712.03
5.4.50.0060.03412.03
5.4.40.0070.03312.03
5.4.30.0090.03412.02
5.4.20.0080.03212.02
5.4.10.0040.03512.02
5.4.00.0090.03111.51
5.3.290.0080.03712.80
5.3.280.0030.04112.71
5.3.270.0070.04412.72
5.3.260.0060.03912.72
5.3.250.0080.03412.72
5.3.240.0040.03912.72
5.3.230.0060.03912.70
5.3.220.0070.03712.68
5.3.210.0060.04012.68
5.3.200.0070.03612.68
5.3.190.0070.03812.68
5.3.180.0080.03612.67
5.3.170.0050.03912.67
5.3.160.0070.03712.67
5.3.150.0090.03512.67
5.3.140.0070.03712.66
5.3.130.0080.03812.66
5.3.120.0070.03812.66
5.3.110.0050.04012.66
5.3.100.0080.04612.13
5.3.90.0050.03912.11
5.3.80.0060.03612.11
5.3.70.0060.03712.10
5.3.60.0060.04012.09
5.3.50.0060.04312.04
5.3.40.0070.04412.04
5.3.30.0090.04712.00
5.3.20.0110.03611.77
5.3.10.0070.03411.74
5.3.00.0040.03811.73
5.2.170.0040.0319.23
5.2.160.0060.0289.23
5.2.150.0040.0359.23
5.2.140.0050.0299.23
5.2.130.0050.0289.19
5.2.120.0080.0259.19
5.2.110.0060.0289.20
5.2.100.0070.0299.19
5.2.90.0050.0439.19
5.2.80.0040.0429.19
5.2.70.0040.0319.19
5.2.60.0050.0309.14
5.2.50.0040.0319.11
5.2.40.0040.0319.09
5.2.30.0050.0329.05
5.2.20.0030.0329.05
5.2.10.0060.0288.96
5.2.00.0040.0288.82
5.1.60.0090.0328.11
5.1.50.0030.0268.10
5.1.40.0050.0248.08
5.1.30.0040.0278.43
5.1.20.0030.0278.46
5.1.10.0030.0268.18
5.1.00.0050.0248.18
5.0.50.0050.0196.66
5.0.40.0080.0216.52
5.0.30.0030.0316.33
5.0.20.0020.0216.29
5.0.10.0020.0206.27
5.0.00.0040.0296.26
4.4.90.0030.0154.78
4.4.80.0030.0144.76
4.4.70.0030.0144.75
4.4.60.0030.0144.75
4.4.50.0010.0174.77
4.4.40.0030.0244.71
4.4.30.0030.0144.75
4.4.20.0060.0124.84
4.4.10.0020.0164.85
4.4.00.0020.0254.76
4.3.110.0030.0154.66
4.3.100.0030.0144.66
4.3.90.0020.0154.63
4.3.80.0030.0244.58
4.3.70.0030.0144.63
4.3.60.0050.0124.63
4.3.50.0030.0154.63
4.3.40.0000.0264.54
4.3.30.0020.0163.30
4.3.20.0020.0163.27
4.3.10.0030.0143.24
4.3.00.0070.01316.50