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() { for ($i = 0; $i < 6; ++$i) { var_dump(serialize(new \stdClass())); } return serialize($this->obj); } public function unserialize($serialized) { $this->obj = unserialize($serialized); } } $wrapper = new WrapperObject(new ObjectWithReferences()); var_dump($wrapper->getObject()); $serialized = serialize($wrapper); var_dump($serialized); $wrapper = unserialize($serialized);

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.70.0110.00416.88
8.3.60.0150.00018.63
8.3.50.0140.00222.15
8.3.40.0040.01118.64
8.3.30.0160.00018.72
8.3.20.0000.00720.24
8.3.10.0150.00421.53
8.3.00.0030.00519.69
8.2.190.0090.00616.58
8.2.180.0100.01016.88
8.2.170.0090.00622.96
8.2.160.0100.01320.32
8.2.150.0080.00024.18
8.2.140.0100.00324.66
8.2.130.0040.01126.16
8.2.120.0060.00317.62
8.2.110.0000.00919.32
8.2.100.0090.00317.93
8.2.90.0030.00519.18
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0060.00317.80
8.2.50.0040.00418.07
8.2.40.0060.00319.34
8.2.30.0000.00720.80
8.2.20.0030.00517.73
8.2.10.0030.00518.23
8.2.00.0040.00418.10
8.1.280.0130.00625.92
8.1.270.0060.00322.16
8.1.260.0040.00426.35
8.1.250.0090.00928.09
8.1.240.0040.00722.13
8.1.230.0090.00318.87
8.1.220.0060.00317.79
8.1.210.0000.00818.77
8.1.200.0060.00317.36
8.1.190.0030.00517.34
8.1.180.0000.00818.10
8.1.170.0030.00618.65
8.1.160.0030.00521.93
8.1.150.0040.00418.87
8.1.140.0030.00517.54
8.1.130.0000.00817.79
8.1.120.0000.00717.41
8.1.110.0030.00517.37
8.1.100.0030.00517.53
8.1.90.0050.00217.47
8.1.80.0000.00717.38
8.1.70.0000.00717.40
8.1.60.0030.00617.62
8.1.50.0060.00317.63
8.1.40.0050.00317.52
8.1.30.0050.00317.64
8.1.20.0040.00417.70
8.1.10.0030.00617.43
8.1.00.0030.00617.38
8.0.300.0030.00620.24
8.0.290.0040.00417.00
8.0.280.0070.00018.49
8.0.270.0030.00317.30
8.0.260.0030.00317.21
8.0.250.0000.00717.07
8.0.240.0000.00716.98
8.0.230.0060.00317.08
8.0.220.0030.00316.88
8.0.210.0060.00317.01
8.0.200.0040.00416.95
8.0.190.0090.00017.04
8.0.180.0040.00416.98
8.0.170.0050.00317.08
8.0.160.0040.00417.09
8.0.150.0030.00316.89
8.0.140.0030.00516.81
8.0.130.0030.00313.42
8.0.120.0040.00417.02
8.0.110.0000.00816.99
8.0.100.0070.00016.90
8.0.90.0030.00517.04
8.0.80.0130.01016.96
8.0.70.0030.00516.95
8.0.60.0040.00416.91
8.0.50.0000.00717.00
8.0.30.0110.01017.17
8.0.20.0060.01317.40
8.0.10.0040.00417.08
8.0.00.0120.01016.86
7.4.330.0030.00315.10
7.4.320.0030.00316.54
7.4.300.0030.00316.64
7.4.290.0030.00316.46
7.4.280.0050.00216.61
7.4.270.0030.00316.63
7.4.260.0070.00016.55
7.4.250.0000.00716.46
7.4.240.0040.00416.62
7.4.230.0000.00816.45
7.4.220.0060.00916.74
7.4.210.0080.00816.60
7.4.200.0030.00316.65
7.4.160.0100.00716.62
7.4.150.0140.00417.40
7.4.140.0100.01117.86
7.4.130.0200.02216.71
7.4.120.0110.00916.56
7.4.110.0110.00716.72
7.4.100.0120.00616.51
7.4.90.0140.00316.72
7.4.80.0100.00719.39
7.4.70.0130.00916.46
7.4.60.0090.00616.71
7.4.50.0000.00816.70
7.4.40.0130.00316.68
7.4.30.0070.01416.69
7.4.10.0060.01215.14
7.4.00.0080.00915.18
7.3.330.0050.00013.23
7.3.320.0030.00313.36
7.3.310.0030.00416.30
7.3.300.0040.00416.35
7.3.290.0090.00816.40
7.3.280.0120.00716.36
7.3.270.0150.00317.40
7.3.260.0100.00716.48
7.3.250.0110.00716.51
7.3.240.0000.01616.39
7.3.230.0130.00916.39
7.3.210.0100.00716.54
7.3.200.0070.01316.71
7.3.190.0070.01016.54
7.3.180.0030.01716.41
7.3.170.0140.01016.34
7.3.160.0150.00316.50
7.3.130.0090.00814.93
7.3.120.0100.01014.95
7.3.110.0120.00414.89
7.3.100.0040.00714.61
7.3.90.0090.00615.13
7.3.80.0070.01115.02
7.3.70.0040.00814.71
7.3.60.0030.00614.99
7.3.50.0040.01414.80
7.3.40.0120.00314.71
7.3.30.0030.00614.99
7.3.20.0030.00716.77
7.3.10.0050.00516.68
7.3.00.0060.00616.57
7.2.330.0040.01516.72
7.2.320.0090.00916.51
7.2.310.0130.00416.61
7.2.300.0160.00016.72
7.2.290.0070.01716.61
7.2.260.0120.00915.15
7.2.250.0070.00715.36
7.2.240.0090.00614.80
7.2.230.0110.00415.17
7.2.220.0060.00614.92
7.2.210.0040.01615.09
7.2.200.0040.01114.99
7.2.190.0080.00315.07
7.2.180.0070.01115.04
7.2.170.0050.00515.03
7.2.160.0060.00615.05
7.2.150.0030.01217.20
7.2.140.0070.00717.01
7.2.130.0090.00316.63
7.2.120.0050.00916.94
7.2.110.0050.00916.61
7.2.100.0050.00916.94
7.2.90.0060.00916.94
7.2.80.0060.01017.00
7.2.70.0060.00816.87
7.2.60.0060.00816.76
7.2.50.0030.00816.77
7.2.40.0050.00916.98
7.2.30.0040.00917.08
7.2.20.0080.00516.84
7.2.10.0090.00517.05
7.2.00.0040.01017.80
7.1.330.0030.01216.03
7.1.320.0130.00615.60
7.1.310.0080.00415.79
7.1.300.0120.00315.75
7.1.290.0030.00915.75
7.1.280.0000.01215.56
7.1.270.0030.00915.66
7.1.260.0030.01015.96
7.1.250.0060.00415.74
7.1.240.0080.00815.99
7.1.230.0000.01315.86
7.1.220.0090.00616.04
7.1.210.0070.01015.75
7.1.200.0100.00615.64
7.1.190.0110.00615.82
7.1.180.0110.00415.58
7.1.170.0080.00815.77
7.1.160.0030.00916.02
7.1.150.0060.01015.79
7.1.140.0080.00615.84
7.1.130.0040.00415.82
7.1.120.0030.00715.84
7.1.110.0050.00515.95
7.1.100.0040.00717.20
7.1.90.0030.00915.75
7.1.80.0060.00615.60
7.1.70.0060.00616.54
7.1.60.0080.01317.52
7.1.50.0100.00816.42
7.1.40.0090.00615.96
7.1.30.0070.00715.78
7.1.20.0060.00315.64
7.1.10.0100.00015.73
7.1.00.0040.04418.98
7.0.330.0070.01015.45
7.0.320.0090.00615.57
7.0.310.0040.00815.10
7.0.300.0060.00315.40
7.0.290.0070.00715.41
7.0.280.0060.00615.46
7.0.270.0030.00915.34
7.0.260.0000.01415.45
7.0.250.0030.01015.37
7.0.240.0120.00315.37
7.0.230.0040.00415.25
7.0.220.0040.01015.24
7.0.210.0030.00915.55
7.0.200.0030.00516.22
7.0.190.0080.00415.52
7.0.180.0030.01015.57
7.0.170.0030.01015.56
7.0.160.0030.00615.50
7.0.150.0040.00415.44
7.0.140.0000.01415.55
7.0.130.0060.01015.53
7.0.120.0070.01015.47
7.0.110.0060.00815.25
7.0.100.0120.00315.50
7.0.90.0000.01415.50
7.0.80.0040.00815.42
7.0.70.1820.02017.65
7.0.60.0050.03717.57
7.0.50.0030.02716.67
7.0.40.0160.03816.90
7.0.30.0330.02716.74
7.0.20.0130.04816.86
7.0.10.0150.04516.93
7.0.00.0020.03116.90
5.6.400.0070.01014.48
5.6.390.0040.00814.73
5.6.380.0110.00314.11
5.6.370.0090.00014.05
5.6.360.0000.01513.93
5.6.350.0060.00914.57
5.6.340.0030.00914.41
5.6.330.0090.00314.32
5.6.320.0140.00014.45
5.6.310.0000.01514.19
5.6.300.0030.01014.50
5.6.290.0120.00314.36
5.6.280.0020.04217.73
5.6.270.0070.00714.53
5.6.260.0040.00814.75
5.6.250.0130.00314.23
5.6.240.0000.01614.29
5.6.230.0110.00314.43
5.6.220.0030.00714.36
5.6.210.0070.04217.52
5.6.200.0050.02516.33
5.6.190.0080.03017.48
5.6.180.0030.04417.43
5.6.170.0170.03717.27
5.6.160.0090.04017.53
5.6.150.0100.04116.26
5.6.140.0120.03016.22
5.6.130.0020.02916.28
5.6.120.0070.02017.66
5.6.110.0050.04817.82
5.6.100.0050.03917.73
5.6.90.0050.05117.66
5.6.80.0080.02517.29
5.6.70.0050.04217.48
5.6.60.0030.00914.62
5.6.50.0040.01114.29
5.6.40.0030.01014.23
5.6.30.0070.00714.39
5.6.20.0150.00314.57
5.6.10.0060.00914.39
5.6.00.0060.00614.25
5.5.380.0070.00714.58
5.5.370.0090.00614.47
5.5.360.0060.00914.44
5.5.350.0030.04617.19
5.5.340.0050.02316.20
5.5.330.0070.03017.41
5.5.320.0030.03117.44
5.5.310.0120.04817.41
5.5.300.0080.04516.16
5.5.290.0020.03516.24
5.5.280.0050.04517.60
5.5.270.0080.04617.48
5.5.260.0100.03817.35
5.5.250.0110.03817.43
5.5.240.0140.04317.12
5.5.230.0040.01114.52
5.5.220.0060.00614.06
5.5.210.0130.00314.42
5.5.200.0030.00914.31
5.5.190.0060.00614.46
5.5.180.0000.01714.30
5.5.170.0000.01114.45
5.5.160.0080.00414.19
5.5.150.0070.00714.18
5.5.140.0040.00714.55
5.5.130.0000.00914.30
5.5.120.0040.00714.52
5.5.110.0100.00314.18
5.5.100.0110.00414.37
5.5.90.0040.01114.36
5.5.80.0090.00314.39
5.5.70.0060.00814.41
5.5.60.0000.01014.24
5.5.50.0030.00914.52
5.5.40.0060.00614.14
5.5.30.0110.00414.61
5.5.20.0050.00514.17
5.5.10.0080.00814.47
5.5.00.0030.00714.41
5.4.450.0640.00216.20
5.4.440.0700.00516.18
5.4.430.0640.00316.10
5.4.420.0630.00516.18
5.4.410.0670.00416.05
5.4.400.0600.00216.02
5.4.390.0630.00216.03
5.4.380.0630.00115.92
5.4.370.0640.00015.83
5.4.360.0630.00415.97
5.4.350.0580.00215.89
5.4.340.0630.00415.89
5.4.330.0030.00612.79
5.4.320.0630.00316.07
5.4.310.0620.00415.96
5.4.300.0620.00316.07
5.4.290.0650.00016.02
5.4.280.0620.00216.02
5.4.270.0620.00515.98
5.4.260.0610.00316.07
5.4.250.0650.00216.02
5.4.240.0580.00416.07
5.4.230.0600.00416.05
5.4.220.0650.00515.97
5.4.210.0770.00215.97
5.4.200.0640.00015.88
5.4.190.0520.00516.00
5.4.180.0620.00415.92
5.4.170.0520.00515.96
5.4.160.0530.00315.82
5.4.150.0530.00316.02
5.4.140.0540.00414.63
5.4.130.0600.00314.57
5.4.120.0500.00314.64
5.4.110.0610.00114.70
5.4.100.0600.00314.63
5.4.90.0580.00514.70
5.4.80.0550.00314.68
5.4.70.0030.02114.59
5.4.60.0090.02014.67
5.4.50.0060.03314.67
5.4.40.0050.03914.61
5.4.30.0050.02014.65
5.4.20.0040.03914.67
5.4.10.0160.02814.66
5.4.00.0000.01212.79

preferences:
58.44 ms | 401 KiB | 5 Q