3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeClass { protected $someProperty; public function __construct($prop) { $this->someProperty = $prop; } public function getSomeProperty() { return $this->someProperty; } } $arr = array(); $someObject = new SomeClass(3); $arr[] = $someObject; $arr[] = $someObject; $someOtherObject = new SomeClass(4); $arr[] = $someOtherObject; $arr[] = $someOtherObject; $arrFiltered = array_unique($arr); var_dump($arrFiltered)

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).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.340.4000.04319.11
5.4.320.4070.03719.13
5.4.310.4130.03718.93
5.4.300.4070.04319.04
5.4.290.4170.03719.22
5.4.280.3500.03718.93
5.4.270.3200.03319.15
5.4.260.3100.04019.04
5.4.250.2930.03319.22
5.4.240.3130.03719.10
5.4.230.3100.04019.14
5.4.220.3300.03319.18
5.4.210.3530.04718.93
5.4.200.3170.04018.93
5.4.190.3430.03019.13
5.4.180.3730.03719.24
5.4.170.3330.03018.91
5.4.160.3900.03319.11
5.4.150.4100.03719.20
5.4.140.4000.03716.48
5.4.130.4030.04016.49
5.4.120.4100.04016.58
5.4.110.4030.03716.61
5.4.100.3600.02716.69
5.4.90.3230.03016.61
5.4.80.3630.03716.41
5.4.70.3500.03716.48
5.4.60.3700.03016.49
5.4.50.3430.04316.45
5.4.40.3700.04016.23
5.4.30.3770.03316.19
5.4.20.4430.02316.52
5.4.10.3400.03716.53
5.4.00.3670.03315.96
5.3.290.3800.04314.71
5.3.280.3230.03714.64
5.3.270.3730.04014.77
5.3.260.4070.03714.65
5.3.250.4200.03714.60
5.3.240.4100.04314.65
5.3.230.3800.03714.68
5.3.220.3830.03714.46
5.3.210.3770.04314.57
5.3.200.4000.03314.63
5.3.190.3500.04714.58
5.3.180.3530.04014.59
5.3.170.3670.04314.63
5.3.160.4070.03314.60
5.3.150.4100.04014.59
5.3.140.3730.04314.56
5.3.130.3770.04314.70
5.3.120.3500.04014.59
5.3.110.3530.04014.62
5.3.100.3370.04714.07
5.3.90.3330.03714.18
5.3.80.3270.03314.08
5.3.70.3300.04014.08
5.3.60.3200.03314.08
5.3.50.3270.04013.96
5.3.40.4300.02714.01
5.3.30.3530.03713.94
5.3.20.3970.04013.85
5.3.10.4070.03713.66
5.3.00.3830.03313.57
5.2.170.2670.03011.14
5.2.160.3700.03011.31
5.2.150.3430.02711.16
5.2.140.3500.03311.21
5.2.130.3530.02011.18
5.2.120.3070.02311.19
5.2.110.3200.03011.04
5.2.100.3130.02711.19
5.2.90.3170.03011.26
5.2.80.3600.03011.07
5.2.70.3470.04011.25
5.2.60.3430.02311.12
5.2.50.3330.03010.94
5.2.40.2470.02711.16
5.2.30.2670.03311.14
5.2.20.2300.03710.97
5.2.10.2500.03010.86
5.2.00.2900.02010.77
5.1.60.2430.0279.98
5.1.50.2630.0309.97
5.1.40.2930.02310.04
5.1.30.2670.03310.40
5.1.20.2730.03010.36
5.1.10.2900.01710.03
5.1.00.2800.03310.09
5.0.50.1600.0238.46
5.0.40.1300.0208.46
5.0.30.1730.0308.20
5.0.20.1670.0208.27
5.0.10.1430.0238.20
5.0.00.1600.0338.23
4.4.90.1570.0205.89
4.4.80.1270.0175.92
4.4.70.1430.0175.89
4.4.60.1230.0205.76
4.4.50.1270.0175.89
4.4.40.1430.0305.85
4.4.30.1630.0175.84
4.4.20.1400.0135.87
4.4.10.1600.0205.87
4.4.00.1300.0275.91
4.3.110.1500.0135.75
4.3.100.1530.0205.80
4.3.90.1600.0205.76
4.3.80.1330.0275.73
4.3.70.1400.0135.73
4.3.60.1600.0175.73
4.3.50.1330.0135.73
4.3.40.1670.0275.73
4.3.30.0800.0235.73
4.3.20.0730.0175.73
4.3.10.0800.0205.73
4.3.00.0670.0175.73

preferences:
142.64 ms | 1386 KiB | 7 Q