3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class TestClass { public $a; public $b; public $c; public $d; } $inner1 = new TestClass; $inner1->a = 1000; $inner2 = new TestClass; $inner2->a = 1000; $inner3 = new TestClass; $inner3->a = 1001; $o1 = new TestClass; $o1->a = 'abc'; $o1->b = ['a', 'b', 'c']; $o1->c = 123456; $o1->d = $inner1; $o2 = new TestClass; $o2->a = 'abc'; $o2->b = ['a', 'b', 'c']; $o2->c = 123456; $o2->d = $inner2; $o3 = new TestClass; $o3->a = 'abc'; $o3->b = ['a', 'b', 'c']; $o3->c = 123456; $o3->d = $inner3; var_dump([ md5($o1), md5($o2), md5($o3), ]); var_dump($o1 == $o2); var_dump($o1 === $o2);
based on 0bGBF

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.80.0040.00816.78
7.2.00.0040.01119.29
7.1.200.0030.00715.73
7.1.100.0040.00718.16
7.1.70.0150.00916.84
7.1.60.0070.01819.50
7.1.50.0190.01634.82
7.1.00.0100.07022.32
7.0.200.0190.00614.96
7.0.140.0000.07022.07
7.0.60.0030.06020.05
7.0.50.0130.07717.89
7.0.40.0030.07720.26
7.0.30.0300.04720.06
7.0.20.0200.06320.06
7.0.10.0130.05320.21
7.0.00.0030.07320.22
5.6.280.0170.06021.16
5.6.210.0100.08020.64
5.6.200.0070.08018.20
5.6.190.0070.07320.47
5.6.180.0300.08020.53
5.6.170.0100.04720.48
5.6.160.0100.07320.52
5.6.150.0130.03318.27
5.6.140.0000.04318.19
5.6.130.0030.04718.28
5.6.120.0030.08320.99
5.6.110.0030.09020.98
5.6.100.0100.08021.04
5.6.90.0070.06720.97
5.6.80.0170.07020.41
5.6.70.0130.04020.37
5.5.350.0230.07720.47
5.5.340.0000.05717.96
5.5.330.0100.03720.21
5.5.320.0100.07720.43
5.5.310.0170.05720.50
5.5.300.0070.08017.99
5.5.290.0070.08017.98
5.5.280.0200.05020.74
5.5.270.0100.08320.89
5.5.260.0170.07720.68
5.5.250.0130.05720.78
5.5.240.0070.08020.37
5.4.450.0530.06719.17
5.4.440.0170.07719.33
5.4.430.0900.06019.55
5.4.420.1530.07319.54
5.4.410.0070.06018.92
5.4.400.0800.05018.78
5.4.390.0900.07318.74
5.4.380.1000.06018.61
5.4.370.0900.07018.63
5.4.360.1070.06018.75
5.4.350.1070.07318.46
5.4.340.1130.06318.85
5.4.320.0900.07718.77
5.4.310.1000.07018.63
5.4.300.1000.07718.69
5.4.290.0800.07318.84
5.4.280.0830.05718.46
5.4.270.0830.07718.77
5.4.260.1530.05018.71
5.4.250.0800.06018.83
5.4.240.0800.07018.71
5.4.230.0930.07318.82
5.4.220.0700.04318.48
5.4.210.0700.06718.60
5.4.200.0500.05316.79
5.4.190.0700.07318.76
5.4.180.0800.05718.50
5.4.170.0830.06018.55
5.4.160.0700.05718.70
5.4.150.0800.05318.75
5.4.140.0730.05716.29
5.4.130.1000.04316.29
5.4.120.1000.05316.43
5.4.110.0830.06016.29
5.4.100.0800.06016.30
5.4.90.0870.07016.33
5.4.80.1100.04316.32
5.4.70.1000.06016.31
5.4.60.1070.05316.36
5.4.50.0900.04716.18
5.4.40.1130.04716.25
5.4.30.2670.05016.41
5.4.20.0900.06316.23
5.4.10.0970.05316.30
5.4.00.0870.04715.72
5.3.290.0930.06714.77
5.3.280.1530.05014.76
5.3.270.0770.07014.74
5.3.260.0900.06014.74
5.3.250.0870.05314.65
5.3.240.0970.04714.65
5.3.230.0730.06014.80
5.3.220.0730.05714.70
5.3.210.0670.06314.69
5.3.200.0800.06314.70
5.3.190.0700.07014.62
5.3.180.0930.05314.79
5.3.170.1430.06314.55
5.3.160.0800.06314.59
5.3.150.1170.04314.75
5.3.140.0800.06314.73
5.3.130.1000.07314.65
5.3.120.1200.06014.54
5.3.110.0870.06314.75
5.3.100.1030.06014.18
5.3.90.1070.06314.05
5.3.80.0800.05714.05
5.3.70.0700.05714.14
5.3.60.0900.05714.10
5.3.50.1030.04313.97
5.3.40.0770.06014.15
5.3.30.0770.04714.02
5.3.20.0800.04313.79
5.3.10.0870.05313.75
5.3.00.0770.05713.66
5.2.170.0730.04311.25
5.2.160.0900.03011.20
5.2.150.0730.04711.37
5.2.140.0800.04711.13
5.2.130.0730.04011.32
5.2.120.0600.04311.12
5.2.110.0570.04311.12
5.2.100.0930.03711.20
5.2.90.0700.04311.13
5.2.80.0630.05311.14
5.2.70.0600.05011.11
5.2.60.0700.05711.15
5.2.50.0830.06011.13
5.2.40.0630.05311.05
5.2.30.0500.04711.10
5.2.20.0600.04710.95
5.2.10.0630.05710.93
5.2.00.0530.04710.82
5.1.60.0500.03010.11
5.1.50.0600.04010.02
5.1.40.0700.04710.02
5.1.30.0470.05710.43
5.1.20.0670.05710.54
5.1.10.0730.04010.09
5.1.00.0470.04310.25
5.0.50.0270.0308.54
5.0.40.0100.0238.39
5.0.30.0270.0538.41
5.0.20.0270.0308.23
5.0.10.0330.0278.24
5.0.00.0330.0508.23
4.4.90.0200.0276.02
4.4.80.0300.0275.88
4.4.70.0230.0235.89
4.4.60.0300.0275.91
4.4.50.0230.0305.88
4.4.40.0200.0435.88
4.4.30.0230.0235.91
4.4.20.0300.0275.92
4.4.10.0170.0235.94
4.4.00.0400.0306.02
4.3.110.0200.0235.95
4.3.100.0300.0235.81
4.3.90.0200.0205.80
4.3.80.0200.0335.84
4.3.70.0200.0305.89
4.3.60.0400.0175.91
4.3.50.0200.0275.79
4.3.40.0230.0405.83
4.3.30.0170.0274.59
4.3.20.0130.0274.55
4.3.10.0200.0234.49
4.3.00.0130.0206.70