3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Widget implements Serializable { public $references = array(); public function serialize() { $vars = get_object_vars($this); $serialized = serialize($vars); return $serialized; } public function unserialize($serialized) { $array = unserialize($serialized); foreach($array as $k => $v) $this->$k = $v; } } class Placeholder { public $id; public function __construct($id) { $this->id = $id; } } $placeholder1 = new Placeholder(1); $placeholder2 = new Placeholder(2); $widgets = array(new Widget, new Widget, new Widget, new Widget); $widgets[0]->references[] = $placeholder1; $widgets[1]->references[] = $placeholder2; $widgets[2]->references[] = $placeholder1; $widgets[3]->references[] = $placeholder1; var_dump(unserialize(serialize($widgets)));

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.0090.00618.30
8.3.50.0160.00521.21
8.3.40.0120.00318.67
8.3.30.0040.01119.26
8.3.20.0000.00820.18
8.3.10.0040.00423.53
8.3.00.0030.00619.69
8.2.180.0090.00916.50
8.2.170.0040.01122.96
8.2.160.0080.00620.46
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0060.00321.09
8.2.110.0090.00020.56
8.2.100.0060.00617.78
8.2.90.0000.00720.50
8.2.80.0080.00018.05
8.2.70.0040.00418.05
8.2.60.0040.00418.22
8.2.50.0000.00818.10
8.2.40.0040.00419.46
8.2.30.0030.00619.37
8.2.20.0000.00817.79
8.2.10.0050.00218.21
8.2.00.0000.00817.80
8.1.280.0110.00425.92
8.1.270.0060.00323.91
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.04
8.1.230.0040.00722.11
8.1.220.0000.00817.79
8.1.210.0000.01518.77
8.1.200.0000.00817.35
8.1.190.0040.00417.35
8.1.180.0000.01018.10
8.1.170.0050.00318.59
8.1.160.0030.00918.93
8.1.150.0000.00718.89
8.1.140.0040.00417.41
8.1.130.0080.00017.83
8.1.120.0040.00417.44
8.1.110.0020.00517.52
8.1.100.0040.00417.47
8.1.90.0020.00517.38
8.1.80.0040.00417.52
8.1.70.0030.00317.37
8.1.60.0050.00317.51
8.1.50.0050.00317.49
8.1.40.0000.00817.42
8.1.30.0000.00817.64
8.1.20.0040.00417.65
8.1.10.0000.00817.57
8.1.00.0030.00617.41
8.0.300.0100.00020.06
8.0.290.0060.00316.88
8.0.280.0030.00318.43
8.0.270.0030.00417.19
8.0.260.0030.00317.20
8.0.250.0050.00217.00
8.0.240.0040.00416.95
8.0.230.0000.00716.99
8.0.220.0030.00316.98
8.0.210.0000.00716.86
8.0.200.0000.00717.02
8.0.190.0000.00717.06
8.0.180.0060.00316.89
8.0.170.0060.00316.96
8.0.160.0070.00017.03
8.0.150.0040.00416.86
8.0.140.0040.00416.92
8.0.130.0030.00313.38
8.0.120.0000.00816.90
8.0.110.0000.00716.80
8.0.100.0050.00216.92
8.0.90.0040.00416.88
8.0.80.0100.00716.93
8.0.70.0070.00017.05
8.0.60.0050.00316.98
8.0.50.0080.00016.86
8.0.30.0130.01217.24
8.0.20.0120.00817.40
8.0.10.0000.00716.97
8.0.00.0110.00717.05
7.4.330.0050.00015.14
7.4.320.0050.00216.47
7.4.300.0060.00016.57
7.4.290.0070.00016.54
7.4.280.0030.00316.61
7.4.270.0040.00316.54
7.4.260.0060.00316.57
7.4.250.0000.00816.50
7.4.240.0050.00216.54
7.4.230.0070.00016.53
7.4.220.0110.00816.48
7.4.210.0090.00616.58
7.4.200.0000.00716.61
7.4.160.0080.00816.54
7.4.150.0080.01217.40
7.4.140.0080.01017.86
7.4.130.0100.00816.60
7.4.120.0110.00616.57
7.4.110.0120.00616.56
7.4.100.0100.00816.68
7.4.90.0150.00316.59
7.4.80.0120.00619.39
7.4.70.0110.00716.44
7.4.60.0060.01016.47
7.4.50.0050.00016.37
7.4.40.0000.01616.53
7.4.30.0060.01016.64
7.4.00.0100.00715.13
7.3.330.0000.00513.36
7.3.320.0000.00513.38
7.3.310.0000.00716.41
7.3.300.0000.00716.38
7.3.290.0080.00616.37
7.3.280.0080.00916.38
7.3.270.0160.01017.40
7.3.260.0190.00616.60
7.3.250.0040.01316.51
7.3.240.0070.01116.60
7.3.230.0060.01916.44
7.3.210.0110.01116.53
7.3.200.0120.00619.39
7.3.190.0070.01016.66
7.3.180.0120.00616.55
7.3.170.0030.01916.61
7.3.160.0120.00916.57
7.3.120.0000.01615.09
7.3.110.0060.01014.77
7.3.100.0040.01114.75
7.3.90.0070.01114.89
7.3.80.0100.00714.58
7.3.70.0060.01014.88
7.3.60.0140.00014.78
7.3.50.0080.00414.69
7.3.40.0080.00814.57
7.3.30.0040.00814.91
7.3.20.0030.01016.43
7.3.10.0070.00816.65
7.3.00.0100.00516.71
7.2.330.0060.01916.66
7.2.320.0040.01416.57
7.2.310.0160.00516.49
7.2.300.0030.01416.79
7.2.290.0060.00916.65
7.2.240.0140.00315.38
7.2.230.0130.00615.38
7.2.220.0110.00715.00
7.2.210.0030.00915.10
7.2.200.0070.00715.29
7.2.190.0030.01015.11
7.2.180.0040.01415.21
7.2.170.0070.01014.87
7.2.160.0040.01515.24
7.2.150.0110.00717.09
7.2.140.0060.01016.96
7.2.130.0090.00716.90
7.2.120.0080.00816.87
7.2.110.0040.00816.70
7.2.100.0110.00516.71
7.2.90.0090.00917.00
7.2.80.0050.01116.87
7.2.70.0080.00916.86
7.2.60.0080.00616.63
7.2.50.0080.00716.81
7.2.40.0030.01216.68
7.2.30.0030.01116.86
7.2.20.0090.00716.92
7.2.10.0080.00616.97
7.2.00.0090.00817.74
7.1.330.0120.00415.72
7.1.320.0000.01315.65
7.1.310.0070.00715.63
7.1.300.0030.01315.70
7.1.290.0030.01415.92
7.1.280.0070.01015.85
7.1.270.0120.00315.89
7.1.260.0070.00715.84
7.1.250.0030.01015.90
7.1.200.0040.01115.79
7.1.100.0040.00717.57
7.1.70.0000.00817.16
7.1.60.0120.00919.70
7.1.50.0200.01034.91
7.1.00.0100.07022.32
7.0.200.0040.01116.70
7.0.140.0100.06722.21
7.0.60.0030.04019.86
7.0.50.0000.06718.02
7.0.40.0070.04320.23
7.0.30.0200.04320.17
7.0.20.0300.08320.30
7.0.10.0070.04320.19
7.0.00.0170.07720.09
5.6.280.0030.07720.79
5.6.210.0070.03720.55
5.6.200.0070.05318.16
5.6.190.0000.06020.50
5.6.180.0370.06320.48
5.6.170.0370.06020.39
5.6.160.0030.08320.55
5.6.150.0000.08018.23
5.6.140.0100.06718.28
5.6.130.0030.07018.28
5.6.120.0000.04321.09
5.6.110.0070.03721.10
5.6.100.0170.08020.98
5.6.90.0070.07321.11
5.6.80.0130.04020.51
5.5.350.0000.08320.47
5.5.340.0100.06718.05
5.5.330.0100.03720.27
5.5.320.0330.04320.28
5.5.310.0330.07020.24
5.5.300.0230.06317.96
5.5.290.0070.03718.04
5.5.280.0000.09720.99
5.5.270.0070.03720.88
5.5.260.0070.07320.89
5.5.250.0070.09020.79
5.5.240.4330.03720.16
5.4.450.0000.04319.25
5.4.440.0070.08019.18
5.4.430.0100.03319.55
5.4.420.0070.04319.52
5.4.410.0030.05019.18
5.4.400.0100.04318.88
5.4.390.0070.07719.14
5.4.380.0000.08019.24
5.4.370.0070.07719.14
5.4.360.0030.06319.12
5.4.350.0100.04318.92
5.4.340.0130.04019.24
5.4.320.0070.07719.16
5.4.310.0030.07718.89
5.4.300.0100.07319.16
5.4.290.0000.07719.14
5.4.280.0070.03719.20
5.4.270.0030.04318.86
5.4.260.0070.03719.15
5.4.250.0170.06019.23
5.4.240.0100.04718.84
5.4.230.0070.07718.87
5.4.220.0130.03018.99
5.4.210.0100.05719.14
5.4.200.0130.06018.84
5.4.190.0030.04019.14
5.4.180.0100.06719.11
5.4.170.0130.06319.11
5.4.160.0130.05018.98
5.4.150.0000.05319.06
5.4.140.0130.06716.49
5.4.130.0070.03316.36
5.4.120.0100.06316.44
5.4.110.0130.06716.48
5.4.100.0070.03316.58
5.4.90.0100.03016.34
5.4.80.0000.04316.38
5.4.70.0070.03716.51
5.4.60.0000.04016.43
5.4.50.0030.04016.31
5.4.40.0030.03316.46
5.4.30.0030.03316.41
5.4.20.0030.03316.28
5.4.10.0000.03716.27
5.4.00.0030.03315.94
5.3.290.0030.05714.61
5.3.280.0000.07014.62
5.3.270.0200.05714.68
5.3.260.0030.08314.54
5.3.250.0070.05014.65
5.3.240.0000.04714.78
5.3.230.0100.07314.66
5.3.220.0030.08014.65
5.3.210.0170.04314.60
5.3.200.0170.06714.48
5.3.190.0000.04014.64
5.3.180.0070.03314.65
5.3.170.0100.03314.62
5.3.160.0030.03714.69
5.3.150.0100.03014.64
5.3.140.0030.03714.61
5.3.130.0030.03714.58
5.3.120.0030.03714.71
5.3.110.0000.04014.73
5.3.100.0000.04014.11
5.3.90.0030.03314.08
5.3.80.0030.03314.09
5.3.70.0030.03314.12
5.3.60.0030.04714.04
5.3.50.0030.03314.01
5.3.40.0070.03314.00
5.3.30.0000.03714.00
5.3.20.0000.03713.67
5.3.10.0030.03313.57
5.3.00.0030.03313.55
5.2.170.0000.03011.17
5.2.160.0000.03011.06
5.2.150.0000.03011.14
5.2.140.0000.03311.34
5.2.130.0030.03011.10
5.2.120.0000.03011.19
5.2.110.0000.03711.10
5.2.100.0030.02711.14
5.2.90.0030.02711.20
5.2.80.0030.03011.09
5.2.70.0030.02711.07
5.2.60.0030.02711.04
5.2.50.0030.03311.00
5.2.40.0030.02711.08
5.2.30.0030.03011.06
5.2.20.0070.02310.98
5.2.10.0000.03010.95
5.2.00.0000.03010.76
5.1.60.0030.02710.06
5.1.50.0070.02310.18
5.1.40.0000.0239.98
5.1.30.0030.02310.37
5.1.20.0030.02310.34
5.1.10.0000.02710.13
5.1.00.0000.02710.06
5.0.50.0030.0178.57
5.0.40.0030.0178.33
5.0.30.0030.0478.15
5.0.20.0070.0178.20
5.0.10.0000.0208.19
5.0.00.0070.0578.16
4.4.90.0000.0137.95
4.4.80.0030.0137.95
4.4.70.0030.0137.95
4.4.60.0000.0177.95
4.4.50.0000.0137.95
4.4.40.0000.0237.95
4.4.30.0000.0137.95
4.4.20.0000.0207.95
4.4.10.0000.0137.95
4.4.00.0000.0237.95
4.3.110.0100.0107.95
4.3.100.0000.0207.95
4.3.90.0000.0277.95
4.3.80.0030.0537.95
4.3.70.0030.0277.95
4.3.60.0030.0337.95
4.3.50.0030.0177.95
4.3.40.0070.0237.95
4.3.30.0000.0177.95
4.3.20.0000.0237.95
4.3.10.0030.0337.95
4.3.00.0000.0237.95

preferences:
45.86 ms | 400 KiB | 5 Q