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 implements Serializable { private $obj; public function __construct($obj) { $this->obj = $obj; } public function getObject() { return $this->obj; } public function serialize() { unserialize(serialize(new \StdClass)); // this fucks up things return serialize($this->obj); } public function unserialize($serialized) { $this->obj = unserialize($serialized); } } $wrapper = new WrapperObject(new ObjectWithReferences()); 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.40.0140.00418.89
8.3.30.0080.00620.35
8.3.20.0080.00020.36
8.3.10.0040.00421.05
8.3.00.0040.00423.48
8.2.170.0040.01122.96
8.2.160.0060.00920.47
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0030.00520.97
8.2.110.0100.00022.30
8.2.100.0090.00317.91
8.2.90.0050.00220.61
8.2.80.0090.00018.05
8.2.70.0000.00818.04
8.2.60.0060.00318.03
8.2.50.0030.00518.10
8.2.40.0000.00819.30
8.2.30.0090.00019.42
8.2.20.0030.00617.60
8.2.10.0000.00717.63
8.2.00.0080.00017.70
8.1.270.0040.00423.78
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.21
8.1.230.0080.00421.03
8.1.220.0050.00317.76
8.1.210.0060.00318.99
8.1.200.0040.00417.35
8.1.190.0000.01017.54
8.1.180.0000.00818.10
8.1.170.0000.00918.52
8.1.160.0000.00719.01
8.1.150.0000.00718.70
8.1.140.0070.00017.39
8.1.130.0030.00317.91
8.1.120.0070.00017.53
8.1.110.0070.00017.49
8.1.100.0000.00717.46
8.1.90.0070.00017.45
8.1.80.0070.00017.55
8.1.70.0000.00817.38
8.1.60.0040.00417.52
8.1.50.0060.00317.55
8.1.40.0000.00817.38
8.1.30.0030.00517.71
8.1.20.0040.00417.70
8.1.10.0000.00717.44
8.1.00.0000.00717.48
8.0.300.0070.00020.03
8.0.290.0040.00416.75
8.0.280.0000.00718.38
8.0.270.0070.00016.91
8.0.260.0030.00316.91
8.0.250.0070.00017.04
8.0.240.0040.00417.02
8.0.230.0030.00317.06
8.0.220.0030.00316.98
8.0.210.0030.00316.95
8.0.200.0060.00016.99
8.0.190.0030.00516.99
8.0.180.0000.00716.91
8.0.170.0000.00717.02
8.0.160.0040.00416.85
8.0.150.0040.00416.93
8.0.140.0030.00716.85
8.0.130.0030.00313.43
8.0.120.0000.00816.96
8.0.110.0000.00716.97
8.0.100.0020.00516.82
8.0.90.0040.00416.88
8.0.80.0030.01317.01
8.0.70.0040.00416.98
8.0.60.0050.00316.89
8.0.50.0040.00416.81
8.0.30.0100.00917.14
8.0.20.0100.01117.40
8.0.10.0040.00417.04
8.0.00.0070.01116.74
7.4.330.0020.00216.84
7.4.320.0030.00316.65
7.4.300.0040.00416.63
7.4.290.0020.00516.51
7.4.280.0030.00316.61
7.4.270.0070.00016.55
7.4.260.0030.00313.20
7.4.250.0030.00516.49
7.4.240.0000.00716.61
7.4.230.0070.00016.61
7.4.220.0120.00616.62
7.4.210.0080.00816.61
7.4.200.0000.00716.44
7.4.190.0000.00716.59
7.4.160.0130.00316.29
7.4.150.0070.01017.40
7.4.140.0130.01217.86
7.4.130.0080.00916.58
7.4.120.0090.00916.58
7.4.110.0130.00316.63
7.4.100.0080.00816.46
7.4.90.0100.00716.72
7.4.80.0000.01719.39
7.4.70.0100.00716.66
7.4.60.0100.00616.61
7.4.50.0040.00416.57
7.4.40.0100.00322.77
7.4.30.0110.00616.54
7.4.00.0090.00614.95
7.3.330.0000.00513.39
7.3.320.0000.00513.43
7.3.310.0030.00316.30
7.3.300.0020.00516.45
7.3.290.0060.01316.41
7.3.280.0080.00816.40
7.3.270.0080.00817.40
7.3.260.0130.00718.24
7.3.250.0110.00916.46
7.3.240.0130.00516.64
7.3.230.0110.00616.39
7.3.210.0080.00816.64
7.3.200.0130.01119.39
7.3.190.0090.00916.45
7.3.180.0060.01016.38
7.3.170.0060.01016.39
7.3.160.0000.01616.38
7.3.120.0030.01314.68
7.3.10.0030.00916.47
7.3.00.0030.01216.27
7.2.330.0060.01216.61
7.2.320.0070.01716.37
7.2.310.0050.01916.39
7.2.300.0140.00316.39
7.2.290.0050.01416.88
7.2.130.0060.00916.98
7.2.120.0120.00316.95
7.2.110.0100.00716.57
7.2.100.0070.01016.71
7.2.90.0030.01016.84
7.2.80.0030.00616.89
7.2.70.0110.00316.89
7.2.60.0030.00916.98
7.2.50.0150.00416.88
7.2.40.0070.01116.89
7.2.30.0090.00617.14
7.2.20.0000.01517.15
7.2.10.0030.01016.63
7.2.00.0000.01616.70
7.1.250.0040.01215.86
7.1.240.0000.00915.76
7.1.230.0060.00915.66
7.1.220.0080.00815.81
7.1.210.0070.00715.68
7.1.200.0020.01115.61
7.1.190.0110.00415.72
7.1.180.0070.01015.86
7.1.170.0100.00315.82
7.1.160.0040.00815.55
7.1.150.0000.01415.56
7.1.140.0000.00915.56
7.1.130.0000.01415.86
7.1.120.0060.00615.95
7.1.110.0100.00615.69
7.1.100.0060.00615.90
7.1.90.0000.01015.62
7.1.80.0060.00915.48
7.1.70.0030.00916.56
7.1.60.0070.01417.38
7.1.50.0080.00816.31
7.1.40.0000.00915.66
7.1.30.0030.01015.83
7.1.20.0060.01015.40
7.1.10.0030.01015.74
7.1.00.0090.02819.06
7.0.330.0030.01315.08
7.0.320.0030.00815.29
7.0.310.0070.00715.22
7.0.300.0040.01215.34
7.0.290.0080.00315.33
7.0.280.0030.01014.99
7.0.270.0030.00715.08
7.0.260.0030.00515.36
7.0.250.0030.00515.40
7.0.240.0030.01015.55
7.0.230.0110.00415.54
7.0.220.0060.00615.34
7.0.210.0000.00815.45
7.0.200.0070.00415.92
7.0.190.0070.00715.39
7.0.180.0000.01415.18
7.0.170.0070.00715.46
7.0.160.0030.01315.46
7.0.150.0070.00715.49
7.0.140.0070.03718.60
7.0.130.0090.00315.27
7.0.120.0070.00715.52
7.0.110.0040.00715.34
7.0.100.0060.00615.24
7.0.90.0130.00015.51
7.0.80.0030.00715.43
7.0.70.0070.00715.43
7.0.60.0050.02818.67
7.0.50.0080.04816.61
7.0.40.0050.04316.63
7.0.30.0130.04516.86
7.0.20.0100.04716.80
7.0.10.0070.02216.80
7.0.00.0080.04316.80
5.6.380.0030.01214.25
5.6.370.0030.01014.18
5.6.360.0090.00314.25
5.6.350.0040.00813.88
5.6.340.0040.00914.50
5.6.330.0060.00914.29
5.6.320.0060.00613.93
5.6.310.0000.01714.51
5.6.300.0000.01514.61
5.6.290.0000.01414.07
5.6.280.0020.04317.42
5.6.270.0100.00314.23
5.6.260.0070.00714.41
5.6.250.0100.00314.38
5.6.240.0030.01014.30
5.6.230.0030.01014.25
5.6.220.0000.01214.33
5.6.210.0110.03717.36
5.6.200.0110.04316.17
5.6.190.0070.04717.49
5.6.180.0130.03917.29
5.6.170.0180.02517.45
5.6.160.0080.03217.45
5.6.150.0070.04416.26
5.6.140.0050.03216.31
5.6.130.0080.04416.39
5.6.120.0080.04517.73
5.6.110.0120.04017.71
5.6.100.0120.04017.87
5.6.90.0050.02617.77
5.6.80.0110.03817.46
5.6.70.0070.00714.33
5.6.60.0040.01114.35
5.6.50.0100.00314.27
5.6.40.0070.00714.07
5.6.30.0080.00614.28
5.6.20.0100.00614.29
5.6.10.0110.00314.43
5.6.00.0030.01314.43
5.5.380.0070.00410.95
5.5.370.0030.00911.26
5.5.360.0030.01011.32
5.5.350.0020.04515.79
5.5.340.0130.03514.66
5.5.330.0080.04615.79
5.5.320.0230.03715.94
5.5.310.0070.02715.81
5.5.300.0060.02314.62
5.5.290.0070.04314.57
5.5.280.0050.04615.84
5.5.270.0080.04516.02
5.5.260.0080.03815.86
5.5.250.0050.04115.68
5.5.240.0090.04515.77
5.5.230.0030.00311.15
5.5.220.0060.00611.09
5.5.210.0080.00010.95
5.5.200.0000.01111.09
5.5.190.0000.01211.29
5.5.180.0000.00711.20
5.5.170.0000.01011.13
5.5.160.0030.00911.22
5.5.150.0030.01011.34
5.5.140.0000.01211.32
5.5.130.0000.01111.16
5.5.120.0030.00511.34
5.5.110.0040.00711.19
5.5.100.0040.00911.03
5.5.90.0060.00610.80
5.5.80.0090.00311.17
5.5.70.0000.00811.00
5.5.60.0070.00311.00
5.5.50.0000.01211.23
5.5.40.0040.00711.35
5.5.30.0060.00610.87
5.5.20.0030.00511.18
5.5.10.0030.00710.66
5.5.00.0050.00510.98
5.4.450.0070.04215.02
5.4.440.0050.04415.23
5.4.430.0060.03815.15
5.4.420.0080.03115.15
5.4.410.0060.02615.06
5.4.400.0030.04215.10
5.4.390.0000.03015.12
5.4.380.0070.04015.15
5.4.370.0080.02015.06
5.4.360.0040.02715.07
5.4.350.0050.02215.03
5.4.340.0030.03815.05
5.4.330.0030.00710.82
5.4.320.0050.04015.20
5.4.310.0000.03315.00
5.4.300.0120.03014.92
5.4.290.0080.03915.08
5.4.280.0100.04214.89
5.4.270.0070.04015.13
5.4.260.0070.02014.99
5.4.250.0070.02515.00
5.4.240.0050.03615.17
5.4.230.0050.02415.02
5.4.220.0000.04714.92
5.4.210.0030.02915.01
5.4.200.0080.02014.90
5.4.190.0060.03614.99
5.4.180.0070.03514.95
5.4.170.0040.03814.73
5.4.160.0050.02515.13
5.4.150.0050.04215.09
5.4.140.0050.04313.65
5.4.130.0050.03213.48
5.4.120.0050.02013.63
5.4.110.0070.03713.73
5.4.100.0080.02513.66
5.4.90.0070.03213.79
5.4.80.0030.02213.58
5.4.70.0020.02713.68
5.4.60.0000.02813.62
5.4.50.0040.02213.67
5.4.40.0050.03113.63
5.4.30.0000.02613.68
5.4.20.0040.03513.66
5.4.10.0020.04413.73
5.4.00.0070.03413.30
5.3.290.0060.02612.76
5.3.280.0070.02212.53
5.3.270.0030.04812.74
5.3.260.0080.03712.74
5.3.250.0050.03312.64
5.3.240.0050.04012.51
5.3.230.0050.02212.66
5.3.220.0070.03912.54
5.3.210.0030.03712.44
5.3.200.0030.03412.62
5.3.190.0080.03812.53
5.3.180.0050.04112.63
5.3.170.0030.04212.60
5.3.160.0050.02012.66
5.3.150.0080.01812.69
5.3.140.0020.03912.54
5.3.130.0050.02312.51
5.3.120.0000.02312.57
5.3.110.0050.02812.64
5.3.100.0060.02812.33
5.3.90.0050.03812.32
5.3.80.0040.03112.40
5.3.70.0030.02912.27
5.3.60.0060.03312.36
5.3.50.0060.04112.22
5.3.40.0020.02412.30
5.3.30.0030.02412.20
5.3.20.0050.02012.19
5.3.10.0060.03912.05
5.3.00.0090.02212.02
5.2.170.0050.01510.48
5.2.160.0020.01810.24
5.2.150.0020.01810.28
5.2.140.0050.02010.23
5.2.130.0040.03210.44
5.2.120.0050.02710.35
5.2.110.0050.02310.32
5.2.100.0030.03710.49
5.2.90.0020.02310.20
5.2.80.0020.03210.39
5.2.70.0030.03610.17
5.2.60.0060.02010.35
5.2.50.0050.03210.30
5.2.40.0050.03310.10
5.2.30.0030.03010.34
5.2.20.0070.02010.25
5.2.10.0030.03710.13
5.2.00.0020.0229.96
5.1.60.0060.0279.38
5.1.50.0000.0159.39
5.1.40.0050.0159.41
5.1.30.0020.0239.51
5.1.20.0040.0179.59
5.1.10.0050.0309.51
5.1.00.0020.0299.47
5.0.50.0040.0158.85
5.0.40.0030.0268.85
5.0.30.0040.0178.85
5.0.20.0020.0258.85
5.0.10.0020.0198.85
5.0.00.0030.0208.85
4.4.90.0030.0158.85
4.4.80.0000.0218.85
4.4.70.0030.0188.85
4.4.60.0000.0138.85
4.4.50.0020.0208.85
4.4.40.0030.0158.85
4.4.30.0020.0108.85
4.4.20.0050.0088.85
4.4.10.0000.0148.85
4.4.00.0030.0178.85
4.3.110.0020.0208.85
4.3.100.0030.0128.85
4.3.90.0050.0138.85
4.3.80.0050.0238.85
4.3.70.0030.0188.85
4.3.60.0020.0108.85
4.3.50.0030.0108.85
4.3.40.0030.0258.85
4.3.30.0030.0188.85
4.3.20.0020.0158.85
4.3.10.0020.0208.85
4.3.00.0020.0208.85

preferences:
48.66 ms | 400 KiB | 5 Q