3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ObjectWithReferences { protected $var1; protected $var2; public function __construct() { $this->var1 = new StdClass(); $this->var2 = $this->var1; } } class WrapperObject { static $tempstorage; protected $obj; public function setObject($obj) { $this->obj = $obj; } public function getObject() { return $this->obj; } } $owr = new ObjectWithReferences(); $wrapper = new WrapperObject(); $wrapper->setObject($owr); var_dump($wrapper->getObject()); $wrapper = unserialize(serialize($wrapper)); var_dump($wrapper->getObject());

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)
8.3.60.0030.01218.54
8.3.50.0120.00821.14
8.3.40.0140.00418.65
8.3.30.0030.01420.30
8.3.20.0080.00020.39
8.3.10.0040.00420.92
8.3.00.0000.00723.59
8.2.180.0110.00716.50
8.2.170.0110.01122.96
8.2.160.0110.00820.35
8.2.150.0080.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.93
8.2.110.0050.00518.95
8.2.100.0040.00817.84
8.2.90.0040.00419.05
8.2.80.0040.00419.21
8.2.70.0080.00017.63
8.2.60.0000.00917.90
8.2.50.0060.00318.07
8.2.40.0060.00318.03
8.2.30.0000.00719.37
8.2.20.0040.00417.68
8.2.10.0040.00417.55
8.2.00.0030.00517.51
8.1.280.0140.00425.92
8.1.270.0040.00423.99
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00322.48
8.1.230.0070.00420.96
8.1.220.0060.00318.77
8.1.210.0090.00018.82
8.1.200.0000.00917.22
8.1.190.0040.00417.52
8.1.180.0060.00318.10
8.1.170.0040.00718.25
8.1.160.0000.00718.89
8.1.150.0040.00418.49
8.1.140.0070.00017.29
8.1.130.0040.00417.85
8.1.120.0040.00417.46
8.1.110.0000.00817.41
8.1.100.0070.00017.33
8.1.90.0070.00017.41
8.1.80.0030.00317.45
8.1.70.0000.01017.39
8.1.60.0040.00417.53
8.1.50.0040.00417.50
8.1.40.0040.00417.41
8.1.30.0040.00417.65
8.1.20.0050.00317.63
8.1.10.0060.00317.45
8.1.00.0030.00517.50
8.0.300.0040.00419.97
8.0.290.0040.00417.05
8.0.280.0000.00718.41
8.0.270.0030.00317.20
8.0.260.0030.00616.90
8.0.250.0080.00016.95
8.0.240.0070.00016.96
8.0.230.0000.00716.99
8.0.220.0000.00716.94
8.0.210.0000.00716.77
8.0.200.0070.00016.90
8.0.190.0000.00716.96
8.0.180.0000.00816.83
8.0.170.0000.00816.86
8.0.160.0030.00316.75
8.0.150.0040.00416.84
8.0.140.0070.00316.85
8.0.130.0030.00313.38
8.0.120.0060.00316.78
8.0.110.0080.00016.90
8.0.100.0070.00016.91
8.0.90.0030.00516.79
8.0.80.0090.00616.85
8.0.70.0000.00817.03
8.0.60.0070.00016.70
8.0.50.0050.00216.80
8.0.30.0070.01317.18
8.0.20.0070.01017.40
8.0.10.0040.00417.02
8.0.00.0120.01016.68
7.4.330.0050.00016.66
7.4.320.0070.00016.62
7.4.300.0030.00316.57
7.4.290.0030.00316.63
7.4.280.0070.00016.46
7.4.270.0060.00016.65
7.4.260.0030.00313.32
7.4.250.0050.00316.47
7.4.240.0000.00816.50
7.4.230.0030.00316.65
7.4.220.0170.00316.47
7.4.210.0050.01516.67
7.4.200.0070.00016.32
7.4.190.0050.00216.52
7.4.160.0150.00316.63
7.4.150.0120.01217.40
7.4.140.0120.00917.86
7.4.130.0150.00316.49
7.4.120.0080.00916.50
7.4.110.0120.00616.64
7.4.100.0150.00616.40
7.4.90.0120.01216.38
7.4.80.0070.01119.39
7.4.70.0090.00816.44
7.4.60.0070.01116.39
7.4.50.0040.00416.26
7.4.40.0030.01522.77
7.4.30.0100.00616.57
7.4.00.0060.01015.00
7.3.330.0030.00313.35
7.3.320.0050.00013.27
7.3.310.0030.00316.20
7.3.300.0000.00716.32
7.3.290.0100.01016.24
7.3.280.0060.01016.31
7.3.270.0060.01217.40
7.3.260.0080.01018.24
7.3.250.0100.00716.45
7.3.240.0040.01316.51
7.3.230.0080.00816.39
7.3.210.0070.01016.43
7.3.200.0120.01119.39
7.3.190.0130.00716.33
7.3.180.0060.00916.35
7.3.170.0130.00316.38
7.3.160.0120.00916.40
7.3.120.0140.00314.93
7.3.10.0100.00816.23
7.3.00.0060.01016.55
7.2.330.0060.01216.71
7.2.320.0100.01316.66
7.2.310.0120.00916.82
7.2.300.0060.01016.36
7.2.290.0130.00316.35
7.2.130.0120.00516.57
7.2.120.0080.00816.52
7.2.110.0080.00816.54
7.2.100.0090.01016.67
7.2.90.0110.00716.71
7.2.80.0130.00616.52
7.2.70.0060.01216.65
7.2.60.0060.01116.62
7.2.50.0080.00816.79
7.2.40.0090.00716.65
7.2.30.0090.00516.59
7.2.20.0110.00916.56
7.2.10.0060.00916.72
7.2.00.0140.00416.62
7.1.250.0100.00715.48
7.1.200.0030.01016.01
7.1.70.0030.00517.24
7.1.60.0110.01419.17
7.1.50.0060.01616.96
7.1.00.0000.05022.57
7.0.200.0030.00616.72
7.0.140.0100.07021.95
7.0.60.0300.04320.08
7.0.50.0100.07717.88
7.0.40.0100.04320.26
7.0.30.0530.07020.25
7.0.20.0330.07320.10
7.0.10.0300.04020.20
7.0.00.0070.06320.05
5.6.280.0000.07720.91
5.6.210.0030.07720.61
5.6.200.0130.04318.29
5.6.190.0100.04720.61
5.6.180.0270.06020.61
5.6.170.0300.08020.44
5.6.160.0200.03320.50
5.6.150.0030.08318.15
5.6.140.0100.08018.27
5.6.130.0000.05318.14
5.6.120.0030.05721.05
5.6.110.0100.07021.12
5.6.100.0100.08021.00
5.6.90.0030.06720.88
5.6.80.0230.06320.43
5.5.350.0200.08020.39
5.5.340.0200.06717.95
5.5.330.0070.08320.56
5.5.320.0370.04320.42
5.5.310.0300.07320.30
5.5.300.0100.03017.95
5.5.290.0100.07317.97
5.5.280.0070.08320.88
5.5.270.0170.07320.88
5.5.260.0100.07320.84
5.5.250.0030.04320.59
5.5.240.0070.08320.16
5.4.450.0200.07319.39
5.4.440.0230.07719.57
5.4.430.0230.07319.46
5.4.420.0330.07019.18
5.4.410.0300.07019.27
5.4.400.0230.05719.09
5.4.390.0370.05319.32
5.4.380.0130.03719.25
5.4.370.0100.04019.13
5.4.360.0100.04018.95
5.4.350.0170.04019.14
5.4.340.0170.03319.07
5.4.320.0200.07319.14
5.4.310.0070.05319.00
5.4.300.0170.03719.05
5.4.290.0130.03719.05
5.4.280.0130.04019.20
5.4.270.0130.03719.06
5.4.260.0130.03719.31
5.4.250.0230.03719.30
5.4.240.0170.03718.93
5.4.230.0170.04018.86
5.4.220.0170.03318.88
5.4.210.0100.05019.16
5.4.200.0070.04319.18
5.4.190.0130.03718.86
5.4.180.0130.03319.12
5.4.170.0130.03718.86
5.4.160.0100.04019.29
5.4.150.0230.05319.14
5.4.140.0170.03016.47
5.4.130.0170.03016.46
5.4.120.0070.03716.50
5.4.110.0300.07316.60
5.4.100.0200.08316.52
5.4.90.0170.07016.31
5.4.80.0200.07316.39
5.4.70.0270.05016.21
5.4.60.0170.04316.53
5.4.50.0170.05716.51
5.4.40.0270.06316.25
5.4.30.0130.07316.42
5.4.20.0200.04316.52
5.4.10.0170.04016.53
5.4.00.0170.03715.80
5.3.290.0200.03714.65
5.3.280.0100.04314.61
5.3.270.0070.04014.61
5.3.260.0100.03714.70
5.3.250.0100.03714.69
5.3.240.0130.03314.70
5.3.230.0230.02714.61
5.3.220.0130.04014.47
5.3.210.0130.06014.66
5.3.200.0100.07714.79
5.3.190.0230.06714.48
5.3.180.0200.07014.79
5.3.170.0270.05014.55
5.3.160.0130.04714.68
5.3.150.0230.07014.68
5.3.140.0030.05714.58
5.3.130.0200.07014.46
5.3.120.0200.05314.60
5.3.110.0230.03714.63
5.3.100.0130.06013.94
5.3.90.0200.05714.00
5.3.80.0100.04014.10
5.3.70.0170.07014.03
5.3.60.0170.06014.10
5.3.50.0230.07313.96
5.3.40.0300.06313.88
5.3.30.0130.06013.85
5.3.20.0330.05713.61
5.3.10.0230.07013.64
5.3.00.0200.07013.81
5.2.170.0170.06012.16
5.2.160.0130.04712.16
5.2.150.0170.06012.16
5.2.140.0270.05312.16
5.2.130.0130.04012.16
5.2.120.0130.05012.16
5.2.110.0200.05312.16
5.2.100.0200.04312.16
5.2.90.0230.02712.16
5.2.80.0130.06712.16
5.2.70.0200.03312.16
5.2.60.0170.05712.16
5.2.50.0130.04012.16
5.2.40.0100.03712.16
5.2.30.0370.02712.16
5.2.20.0270.03012.16
5.2.10.0200.05712.16
5.2.00.0100.06312.16
5.1.60.0100.05012.16
5.1.50.0170.04712.16
5.1.40.0130.04712.16
5.1.30.0170.04312.16
5.1.20.0130.05012.16
5.1.10.0130.04312.16
5.1.00.0130.04712.16
5.0.50.0070.04312.16
5.0.40.0030.03312.16
5.0.30.0300.04012.16
5.0.20.0100.03012.16
5.0.10.0070.02312.16
5.0.00.0070.04312.16
4.4.90.0100.03712.16
4.4.80.0030.02012.16
4.4.70.0030.03312.16
4.4.60.0130.03312.16
4.4.50.0070.03312.16
4.4.40.0030.05712.16
4.4.30.0070.02712.16
4.4.20.0000.03712.16
4.4.10.0070.02312.16
4.4.00.0070.04312.16
4.3.110.0100.02712.16
4.3.100.0000.03712.16
4.3.90.0100.02312.16
4.3.80.0030.04012.16
4.3.70.0070.02312.16
4.3.60.0030.02712.16
4.3.50.0070.02012.16
4.3.40.0100.03312.16
4.3.30.0070.03712.16
4.3.20.0000.04012.16
4.3.10.0000.04012.16
4.3.00.0070.03312.16

preferences:
46.6 ms | 401 KiB | 5 Q