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() { if (is_string($this->obj)) { $this->obj = unserialize($this->obj); } return $this->obj; } public function serialize() { return serialize($this->obj); } public function unserialize($serialized) { $this->obj = $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.0090.00918.53
8.3.30.0090.00618.89
8.3.20.0080.00018.73
8.3.10.0030.00620.51
8.3.00.0080.00019.38
8.2.170.0070.00722.96
8.2.160.0150.00320.52
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0080.00018.75
8.2.110.0030.00720.97
8.2.100.0070.00417.91
8.2.90.0000.00919.38
8.2.80.0040.00419.40
8.2.70.0040.00417.50
8.2.60.0030.00618.04
8.2.50.0030.00618.07
8.2.40.0030.00518.03
8.2.30.0000.01017.98
8.2.20.0030.00619.35
8.2.10.0050.00317.76
8.2.00.0050.00517.75
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0040.00422.52
8.1.230.0050.00520.89
8.1.220.0000.00817.74
8.1.210.0090.00018.96
8.1.200.0090.00017.47
8.1.190.0050.00217.52
8.1.180.0040.00418.10
8.1.170.0040.00420.68
8.1.160.0000.00918.82
8.1.150.0030.00618.67
8.1.140.0040.00417.46
8.1.130.0000.00717.46
8.1.120.0040.00417.33
8.1.110.0040.00417.45
8.1.100.0000.00717.52
8.1.90.0040.00417.50
8.1.80.0000.00717.44
8.1.70.0030.00317.37
8.1.60.0040.00417.62
8.1.50.0000.00817.51
8.1.40.0040.00717.54
8.1.30.0060.00317.68
8.1.20.0080.00017.63
8.1.10.0080.00017.59
8.1.00.0030.00617.46
8.0.300.0070.00020.05
8.0.290.0040.00416.75
8.0.280.0050.00318.46
8.0.270.0000.00717.28
8.0.260.0030.00316.79
8.0.250.0040.00417.08
8.0.240.0000.01017.05
8.0.230.0000.00717.06
8.0.220.0030.00316.97
8.0.210.0000.00816.85
8.0.200.0000.00717.10
8.0.190.0070.00016.94
8.0.180.0040.00417.00
8.0.170.0000.00816.95
8.0.160.0000.00716.93
8.0.150.0000.00816.83
8.0.140.0030.00916.96
8.0.130.0000.00713.42
8.0.120.0040.00416.92
8.0.110.0080.00016.93
8.0.100.0050.00316.88
8.0.90.0030.00616.93
8.0.80.0110.00816.95
8.0.70.0040.00417.09
8.0.60.0040.00416.91
8.0.50.0070.00016.94
8.0.30.0110.00717.36
8.0.20.0050.01417.00
8.0.10.0000.00816.89
8.0.00.0090.01216.79
7.4.330.0000.00512.95
7.4.320.0030.00316.61
7.4.300.0000.00616.66
7.4.290.0030.00316.55
7.4.280.0040.00416.68
7.4.270.0040.00416.53
7.4.260.0050.00013.17
7.4.250.0030.00616.60
7.4.240.0040.00416.54
7.4.230.0050.00316.43
7.4.220.0120.01516.68
7.4.210.0070.00916.62
7.4.200.0070.00016.41
7.4.190.0000.00716.68
7.4.160.0150.00016.41
7.4.150.0090.01216.47
7.4.140.0100.01116.56
7.4.130.0040.01216.64
7.4.120.0070.01016.73
7.4.110.0140.00716.60
7.4.100.0000.01816.38
7.4.90.0120.00616.43
7.4.80.0180.00019.39
7.4.70.0080.01216.67
7.4.60.0100.01016.59
7.4.50.0000.00616.44
7.4.40.0040.01516.36
7.4.30.0120.00416.52
7.4.00.0070.01014.88
7.3.330.0060.00013.34
7.3.320.0000.00713.39
7.3.310.0000.00816.29
7.3.300.0000.00616.26
7.3.290.0030.01116.38
7.3.280.0060.01116.32
7.3.270.0060.01216.64
7.3.260.0090.00916.32
7.3.250.0200.01216.45
7.3.240.0110.00716.62
7.3.230.0120.00616.54
7.3.210.0100.00616.62
7.3.200.0130.00316.61
7.3.190.0160.00016.55
7.3.180.0030.01316.52
7.3.170.0050.01116.27
7.3.160.0070.01016.53
7.3.120.0110.00315.11
7.2.330.0090.00916.71
7.2.320.0030.02116.91
7.2.310.0070.01116.45
7.2.300.0030.01516.81
7.2.290.0090.00916.67
7.2.60.0140.00016.80
7.2.00.0030.01019.66
7.1.200.0030.01215.92
7.1.70.0060.00617.13
7.1.60.0140.00017.21
7.1.50.0030.01716.80
7.1.00.0030.03322.30
7.0.200.0030.00616.69
7.0.140.0070.07022.12
7.0.120.0000.07322.05
7.0.60.0070.08319.85
7.0.50.0100.05317.91
7.0.40.0070.05317.79
7.0.30.0100.08017.71
7.0.20.0030.04717.86
7.0.10.0130.07317.75
7.0.00.0100.08017.75
5.6.280.0030.07320.86
5.6.210.0130.06020.66
5.6.200.0070.04018.15
5.6.190.0070.08018.19
5.6.180.0100.07718.12
5.6.170.0030.08318.19
5.6.160.0100.07318.25
5.6.150.0130.07318.28
5.6.140.0100.07718.15
5.6.130.0130.08018.14
5.6.120.0030.04718.27
5.6.110.0030.05318.17
5.6.100.0000.09018.22
5.6.90.0130.07018.15
5.6.80.0070.06017.56
5.6.70.0100.06717.55
5.6.60.0000.05017.56
5.6.50.0100.08017.67
5.6.40.0170.04017.55
5.6.30.0000.06017.51
5.6.20.0100.06017.53
5.6.10.0030.05317.54
5.6.00.0170.06317.50
5.5.350.0170.04320.46
5.5.340.0030.07018.04
5.5.330.0100.07717.97
5.5.320.0100.04717.93
5.5.310.0070.04317.98
5.5.300.0070.08718.07
5.5.290.0070.04317.99
5.5.280.0130.07018.01
5.5.270.0430.01317.94
5.5.260.0170.07317.97
5.5.250.0130.07017.79
5.5.240.0100.08317.47
5.5.230.0070.07317.32
5.5.220.0000.05317.30
5.5.210.0030.08317.45
5.5.200.0130.07017.37
5.5.190.0030.04017.30
5.5.180.0070.04717.29
5.5.160.0070.07717.27
5.5.150.0000.04317.30
5.5.140.0070.04717.39
5.5.130.0100.08017.39
5.5.120.0100.03717.30
5.5.110.0130.07017.28
5.5.100.0100.07717.21
5.5.90.0100.05317.19
5.5.80.0130.06317.34
5.5.70.0030.08317.28
5.5.60.0100.07017.32
5.5.50.0030.07717.23
5.5.40.0070.05017.25
5.5.30.0170.06717.25
5.5.20.0130.07317.30
5.5.10.0070.06317.25
5.5.00.0030.05717.22
5.4.450.0030.05019.22
5.4.440.0130.05319.43
5.4.430.0030.08019.42
5.4.420.0000.05019.21
5.4.410.0100.07719.25
5.4.400.0030.08018.98
5.4.390.0070.07018.95
5.4.380.0100.05019.02
5.4.370.0070.07719.05
5.4.360.0100.07719.27
5.4.350.0030.06019.14
5.4.340.0100.06719.09
5.4.320.0130.05318.89
5.4.310.0070.07319.03
5.4.300.0170.07019.12
5.4.290.0100.06719.01
5.4.280.0030.07019.01
5.4.270.0100.06318.95
5.4.260.0230.06319.11
5.4.250.0100.03319.05
5.4.240.0070.07319.01
5.4.230.0170.04319.05
5.4.220.0100.04718.95
5.4.210.0070.05019.09
5.4.200.0100.08019.07
5.4.190.0100.03019.04
5.4.180.0030.04018.88
5.4.170.0030.08319.08
5.4.160.0100.05718.96
5.4.150.0130.04319.00
5.4.140.0130.07016.41
5.4.130.0070.05016.41
5.4.120.0070.04316.43
5.4.110.0070.05716.25
5.4.100.0030.04716.49
5.4.90.0100.07016.55
5.4.80.0130.04016.44
5.4.70.0100.05716.36
5.4.60.0000.06716.22
5.4.50.0070.04316.31
5.4.40.0070.03716.43
5.4.30.0170.03016.30
5.4.20.0130.05716.43
5.4.10.0100.03016.55
5.4.00.0230.04015.68
5.3.290.0130.06714.71
5.3.280.0130.07014.64
5.3.270.0070.07714.64
5.3.260.0070.05014.57
5.3.250.0070.05014.62
5.3.240.0100.07714.60
5.3.230.0030.05314.68
5.3.220.0100.07714.57
5.3.210.0070.08014.59
5.3.200.0100.06314.59
5.3.190.0070.06314.62
5.3.180.0100.07014.58
5.3.170.0070.08014.59
5.3.160.0170.04014.61
5.3.150.0100.07314.66
5.3.140.0130.07014.58
5.3.130.0100.04714.40
5.3.120.0030.08014.61
5.3.110.0100.04014.59
5.3.100.0070.05014.04
5.3.90.0100.03314.02
5.3.80.0030.03714.07
5.3.70.0000.04014.04
5.3.60.0170.06714.02
5.3.50.0070.07013.81
5.3.40.0170.06014.04
5.3.30.0100.04714.00
5.3.20.0030.04313.77
5.3.10.0130.07013.67
5.3.00.0130.06313.64
5.2.170.0000.06011.13
5.2.160.0030.06711.23
5.2.150.0030.06711.20
5.2.140.0030.06011.22
5.2.130.0070.05711.15
5.2.120.0100.05011.08
5.2.110.0100.05311.01
5.2.100.0030.04311.16
5.2.90.0100.05311.32
5.2.80.0000.04711.17
5.2.70.0070.06311.31
5.2.60.0070.06011.11
5.2.50.0100.04711.07
5.2.40.0070.02711.22
5.2.30.0070.06010.85
5.2.20.0000.06711.04
5.2.10.0170.05310.93
5.2.00.0030.06310.64
5.1.60.0070.0309.93
5.1.50.0000.0279.82
5.1.40.0030.0509.97
5.1.30.0030.05010.39
5.1.20.0000.05010.41
5.1.10.0100.05310.03
5.1.00.0070.04710.07
5.0.50.0000.0538.55
5.0.40.0000.0308.53
5.0.30.0070.0608.28
5.0.20.0030.0308.28
5.0.10.0030.0438.01
5.0.00.0030.0678.14
4.4.90.0000.0337.91
4.4.80.0030.0337.91
4.4.70.0030.0377.91
4.4.60.0000.0277.91
4.4.50.0030.0277.91
4.4.40.0000.0507.91
4.4.30.0070.0307.91
4.4.20.0000.0277.91
4.4.10.0030.0277.91
4.4.00.0030.0507.91
4.3.110.0070.0307.91
4.3.100.0030.0337.91
4.3.90.0000.0277.91
4.3.80.0070.0277.91
4.3.70.0070.0177.91
4.3.60.0070.0307.91
4.3.50.0030.0237.91
4.3.40.0000.0537.91
4.3.30.0030.0307.91
4.3.20.0030.0277.91
4.3.10.0000.0237.91
4.3.00.0000.0377.91

preferences:
46.88 ms | 400 KiB | 5 Q