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.40.0140.00618.79
8.3.30.0060.01019.22
8.3.20.0070.00020.24
8.3.10.0050.00323.69
8.3.00.0040.00419.01
8.2.170.0040.01822.96
8.2.160.0070.00720.56
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0080.00020.77
8.2.110.0100.00022.08
8.2.100.0080.00418.03
8.2.90.0000.00818.92
8.2.80.0030.00717.97
8.2.70.0040.00417.63
8.2.60.0000.00818.05
8.2.50.0030.00618.07
8.2.40.0030.00519.78
8.2.30.0070.00018.35
8.2.20.0050.00317.68
8.2.10.0070.00018.22
8.2.00.0040.00417.68
8.1.270.0090.00623.95
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.08
8.1.230.0080.00319.14
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00517.25
8.1.180.0060.00318.10
8.1.170.0060.00318.59
8.1.160.0000.00722.07
8.1.150.0060.00318.67
8.1.140.0000.00717.38
8.1.130.0000.00717.70
8.1.120.0000.00717.49
8.1.110.0000.00817.36
8.1.100.0040.00317.54
8.1.90.0050.00217.40
8.1.80.0000.00817.37
8.1.70.0000.00717.36
8.1.60.0040.00417.51
8.1.50.0000.00717.52
8.1.40.0060.00317.47
8.1.30.0070.00317.57
8.1.20.0000.00817.68
8.1.10.0000.00717.59
8.1.00.0040.00417.42
8.0.300.0000.00718.77
8.0.290.0050.00317.04
8.0.280.0040.00418.46
8.0.270.0040.00417.29
8.0.260.0070.00017.18
8.0.250.0060.00017.07
8.0.240.0040.00417.00
8.0.230.0050.00217.06
8.0.220.0000.00716.95
8.0.210.0030.00316.85
8.0.200.0060.00017.07
8.0.190.0050.00317.05
8.0.180.0060.00316.91
8.0.170.0000.00716.98
8.0.160.0040.00416.91
8.0.150.0070.00016.93
8.0.140.0070.00016.91
8.0.130.0000.00613.45
8.0.120.0040.00416.92
8.0.110.0000.00716.86
8.0.100.0070.00016.88
8.0.90.0000.00716.87
8.0.80.0090.01216.92
8.0.70.0040.00417.02
8.0.60.0080.00016.84
8.0.50.0070.00016.98
8.0.30.0110.00916.97
8.0.20.0110.00817.40
8.0.10.0040.00417.05
8.0.00.0100.01116.77
7.4.330.0000.00615.10
7.4.320.0060.00016.41
7.4.300.0040.00416.55
7.4.290.0050.00216.52
7.4.280.0080.00016.65
7.4.270.0030.00416.38
7.4.260.0000.00716.42
7.4.250.0050.00316.54
7.4.240.0060.00216.58
7.4.230.0030.00316.73
7.4.220.0200.00716.63
7.4.210.0100.00616.64
7.4.200.0080.00016.72
7.4.190.0030.00516.56
7.4.160.0030.01216.61
7.4.150.0100.01317.40
7.4.140.0070.01117.86
7.4.130.0080.00916.63
7.4.120.0100.01016.63
7.4.110.0060.01316.68
7.4.100.0160.00616.61
7.4.90.0100.00916.46
7.4.80.0060.01519.39
7.4.70.0060.01016.45
7.4.60.0090.01516.49
7.4.50.0060.00316.39
7.4.40.0130.01316.62
7.4.30.0100.01316.55
7.4.00.0130.00314.95
7.3.330.0030.00313.34
7.3.320.0030.00313.34
7.3.310.0040.00416.22
7.3.300.0070.00016.39
7.3.290.0070.00716.36
7.3.280.0100.00816.36
7.3.270.0060.01317.40
7.3.260.0090.00916.41
7.3.250.0120.01016.51
7.3.240.0090.00916.41
7.3.230.0150.01016.41
7.3.210.0060.01616.74
7.3.200.0100.01019.39
7.3.190.0110.00716.49
7.3.180.0080.00816.46
7.3.170.0080.00816.38
7.3.160.0090.01216.39
7.3.120.0030.01015.06
7.2.330.0030.01416.64
7.2.320.0120.00616.81
7.2.310.0190.00616.76
7.2.300.0070.01116.73
7.2.290.0140.00516.70
7.2.00.0030.01219.22
7.1.200.0090.00615.70
7.1.100.0040.00718.22
7.1.70.0000.00817.02
7.1.60.0140.01119.46
7.1.50.0130.00617.00
7.1.00.0030.07722.54
7.0.200.0000.01016.53
7.0.140.0030.07322.15
7.0.60.0130.07319.98
7.0.50.0100.05017.76
7.0.40.0070.04320.20
7.0.30.0270.08320.28
7.0.20.0100.05020.07
7.0.10.0230.04020.12
7.0.00.0130.07720.08
5.6.280.0030.07321.00
5.6.210.0070.08020.49
5.6.200.0100.07018.16
5.6.190.0130.07020.64
5.6.180.3600.03720.42
5.6.170.0270.05020.44
5.6.160.0030.08720.54
5.6.150.0070.03718.25
5.6.140.0030.05718.14
5.6.130.0070.05318.25
5.6.120.0130.07721.00
5.6.110.0130.08020.98
5.6.100.0070.07021.09
5.6.90.0070.08021.11
5.6.80.0030.04020.38
5.5.350.0200.06320.41
5.5.340.0100.05718.07
5.5.330.0030.04320.32
5.5.320.0530.06720.41
5.5.310.0200.04020.35
5.5.300.0000.06017.93
5.5.290.0030.08317.96
5.5.280.0200.07320.86
5.5.270.0130.08020.73
5.5.260.0100.08320.87
5.5.250.0130.07320.70
5.5.240.0030.05020.38
5.4.450.0970.05719.39
5.4.440.0700.06319.48
5.4.430.0900.04719.38
5.4.420.0630.00019.63
5.4.410.0200.06018.71
5.4.400.0200.06718.84
5.4.390.0270.05018.49
5.4.380.0130.05718.48
5.4.370.0070.03718.77
5.4.360.0170.05018.51
5.4.350.0090.03412.04
5.4.340.0100.05012.03
5.4.320.0060.04212.52
5.4.310.0050.03812.52
5.4.300.0080.03612.51
5.4.290.0050.04612.51
5.4.280.0060.03512.41
5.4.270.0070.03612.41
5.4.260.0100.03612.41
5.4.250.0090.04112.41
5.4.240.0130.03612.41
5.4.230.0090.04412.40
5.4.220.0130.05112.41
5.4.210.0100.05012.40
5.4.200.0090.03912.40
5.4.190.0070.03712.39
5.4.180.0090.05312.39
5.4.170.0050.05612.41
5.4.160.0110.04612.40
5.4.150.0090.05112.40
5.4.140.0080.04412.08
5.4.130.0040.05312.07
5.4.120.0120.04712.02
5.4.110.0060.05312.02
5.4.100.0060.03912.03
5.4.90.0090.05112.02
5.4.80.0090.05212.02
5.4.70.0120.05212.02
5.4.60.0080.05312.02
5.4.50.0070.05512.02
5.4.40.0140.06112.01
5.4.30.0120.03812.00
5.4.20.0050.03812.01
5.4.10.0050.03712.01
5.4.00.0080.04211.50
5.3.290.0070.03912.80
5.3.280.0120.05012.72
5.3.270.0100.05112.73
5.3.260.0060.04612.73
5.3.250.0070.04512.73
5.3.240.0110.05112.73
5.3.230.0110.03812.72
5.3.220.0080.03912.69
5.3.210.0090.03912.69
5.3.200.0100.03912.69
5.3.190.0050.04012.69
5.3.180.0060.03712.69
5.3.170.0090.03812.69
5.3.160.0110.05112.68
5.3.150.0100.04912.69
5.3.140.0100.05112.68
5.3.130.0150.06512.67
5.3.120.0100.05812.68
5.3.110.0090.05012.67
5.3.100.0120.04412.16
5.3.90.0110.04712.14
5.3.80.0120.07612.13
5.3.70.0300.09712.13
5.3.60.0110.06412.12
5.3.50.0110.04712.07
5.3.40.0060.05312.06
5.3.30.0160.07312.03
5.3.20.0100.06911.80
5.3.10.0080.06511.77
5.3.00.0060.05411.75
5.2.170.0040.0459.25
5.2.160.0130.0359.25
5.2.150.0090.0509.25
5.2.140.0060.0499.24
5.2.130.0060.0509.20
5.2.120.0060.0649.20
5.2.110.0100.0449.21
5.2.100.0060.0439.21
5.2.90.0050.0449.21
5.2.80.0050.0329.20
5.2.70.0040.0369.20
5.2.60.0090.0429.16
5.2.50.0070.0449.12
5.2.40.0050.0419.10
5.2.30.0080.0449.08
5.2.20.0040.0439.07
5.2.10.0090.0378.97
5.2.00.0220.0638.84
5.1.60.0090.0328.11
5.1.50.0090.0328.11
5.1.40.0070.0308.10
5.1.30.0130.0438.45
5.1.20.0040.0448.46
5.1.10.0070.0378.19
5.1.00.0060.0328.19
5.0.50.0110.0296.66
5.0.40.0050.0266.52
5.0.30.0080.0276.34
5.0.20.0030.0216.30
5.0.10.0040.0246.28
5.0.00.0040.0316.27
4.4.90.0020.0164.78
4.4.80.0050.0134.75
4.4.70.0020.0174.75
4.4.60.0030.0164.76
4.4.50.0040.0214.77
4.4.40.0040.0344.71
4.4.30.0070.0194.75
4.4.20.0030.0164.84
4.4.10.0060.0144.85
4.4.00.0040.0254.76
4.3.110.0050.0154.66
4.3.100.0030.0164.67
4.3.90.0030.0164.63
4.3.80.0020.0274.58
4.3.70.0020.0174.63
4.3.60.0090.0104.63
4.3.50.0040.0154.63
4.3.40.0040.0324.54
4.3.30.0030.0153.30
4.3.20.0030.0153.28
4.3.10.0030.0153.23
4.3.00.0170.0176.68

preferences:
36.66 ms | 400 KiB | 5 Q