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(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.0130.00718.55
8.3.50.0120.01021.33
8.3.40.0030.01218.80
8.3.30.0090.00618.70
8.3.20.0040.00418.85
8.3.10.0040.00420.99
8.3.00.0040.00423.48
8.2.180.0030.01516.75
8.2.170.0110.00422.96
8.2.160.0030.01020.22
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0040.00420.89
8.2.110.0030.00721.18
8.2.100.0000.01217.84
8.2.90.0040.00819.36
8.2.80.0050.00317.97
8.2.70.0000.00817.75
8.2.60.0080.00017.93
8.2.50.0030.00618.10
8.2.40.0070.00018.16
8.2.30.0050.00219.56
8.2.20.0050.00317.85
8.2.10.0000.00717.81
8.2.00.0040.00417.77
8.1.280.0070.01125.92
8.1.270.0040.00423.99
8.1.260.0120.00626.35
8.1.250.0070.00028.09
8.1.240.0030.00619.53
8.1.230.0040.00717.70
8.1.220.0060.00317.91
8.1.210.0040.00418.77
8.1.200.0070.00417.46
8.1.190.0000.00817.23
8.1.180.0030.00518.10
8.1.170.0050.00318.59
8.1.160.0000.00718.90
8.1.150.0000.00818.71
8.1.140.0040.00417.42
8.1.130.0070.00017.84
8.1.120.0080.00017.50
8.1.110.0080.00017.38
8.1.100.0000.00817.48
8.1.90.0000.00917.45
8.1.80.0000.00717.48
8.1.70.0030.00317.34
8.1.60.0040.00417.48
8.1.50.0030.00717.45
8.1.40.0040.00417.41
8.1.30.0040.00417.70
8.1.20.0000.00817.56
8.1.10.0000.00817.61
8.1.00.0000.00817.50
8.0.300.0040.00418.77
8.0.290.0030.00616.63
8.0.280.0030.00318.46
8.0.270.0040.00417.25
8.0.260.0000.00716.84
8.0.250.0040.00417.02
8.0.240.0030.00616.97
8.0.230.0070.00016.93
8.0.220.0070.00016.82
8.0.210.0030.00316.79
8.0.200.0070.00016.98
8.0.190.0070.00016.88
8.0.180.0040.00416.97
8.0.170.0000.00716.91
8.0.160.0030.00516.89
8.0.150.0040.00416.88
8.0.140.0000.01116.78
8.0.130.0030.00313.38
8.0.120.0040.00416.87
8.0.110.0040.00416.80
8.0.100.0080.00016.73
8.0.90.0030.00516.76
8.0.80.0070.00716.87
8.0.70.0020.00516.90
8.0.60.0030.00516.89
8.0.50.0050.00216.94
8.0.30.0080.01117.16
8.0.20.0090.00917.40
8.0.10.0040.00417.07
8.0.00.0100.01216.95
7.4.330.0000.00616.66
7.4.320.0050.00316.57
7.4.300.0030.00316.64
7.4.290.0000.00716.50
7.4.280.0040.00416.50
7.4.270.0040.00416.62
7.4.260.0030.00313.25
7.4.250.0070.00016.48
7.4.240.0030.00316.45
7.4.230.0040.00416.43
7.4.220.0100.01116.34
7.4.210.0080.00916.56
7.4.200.0040.00416.44
7.4.190.0000.00816.75
7.4.160.0090.01216.36
7.4.150.0030.01517.40
7.4.140.0110.00617.86
7.4.130.0070.01116.43
7.4.120.0100.00916.45
7.4.110.0080.00816.36
7.4.100.0090.00916.57
7.4.90.0040.01516.39
7.4.80.0110.00719.39
7.4.70.0090.00916.65
7.4.60.0130.00316.48
7.4.50.0000.00716.62
7.4.40.0030.01022.77
7.4.30.0100.00716.45
7.4.00.0100.00715.07
7.3.330.0000.00513.37
7.3.320.0050.00013.36
7.3.310.0030.00316.22
7.3.300.0000.00716.38
7.3.290.0080.01216.32
7.3.280.0080.00916.32
7.3.270.0100.00717.40
7.3.260.0130.00618.24
7.3.250.0110.00816.51
7.3.240.0100.00616.37
7.3.230.0100.01016.39
7.3.210.0090.00916.22
7.3.200.0110.00819.39
7.3.190.0070.01016.24
7.3.180.0090.00616.48
7.3.170.0060.00916.60
7.3.160.0090.00616.38
7.3.120.0060.00914.93
7.2.330.0000.01716.46
7.2.320.0100.01316.79
7.2.310.0040.01416.84
7.2.300.0100.01316.75
7.2.290.0130.00316.81
7.2.00.0030.01219.38
7.1.100.0040.00718.17
7.1.70.0030.00517.09
7.1.60.0070.00316.93
7.1.50.0070.01416.94
7.1.00.0000.03722.46
7.0.200.0040.01116.94
7.0.140.0100.07021.93
7.0.110.0070.04320.02
7.0.100.0000.04319.98
7.0.90.0000.04719.95
7.0.80.0070.03719.95
7.0.70.0330.03720.00
7.0.60.0430.03719.66
7.0.50.0200.04720.00
7.0.40.0000.04319.78
7.0.30.0100.03319.70
7.0.20.0030.03719.69
7.0.10.0070.04719.78
7.0.00.0030.04319.74
5.6.280.0000.07721.04
5.6.260.0100.03020.70
5.6.250.0030.03720.68
5.6.240.0070.04320.72
5.6.230.0030.04720.48
5.6.220.0070.03720.67
5.6.210.0000.04720.63
5.6.200.0070.04020.56
5.6.190.0030.04320.59
5.6.180.0070.04020.63
5.6.170.0070.03320.61
5.6.160.0100.03320.68
5.6.150.0000.04720.86
5.6.140.0130.03720.56
5.6.130.0130.05720.55
5.6.120.0030.08720.66
5.6.110.0130.07020.46
5.6.100.0130.06720.63
5.6.90.0130.07020.44
5.6.80.0170.06719.95
5.6.70.0200.03320.08
5.6.60.0130.06319.99
5.6.50.0070.08319.94
5.6.40.0070.03720.00
5.6.30.0070.04019.83
5.6.20.0070.04020.04
5.6.10.0030.07020.00
5.6.00.0030.05720.05
5.5.380.0030.04017.53
5.5.370.0070.03717.72
5.5.360.0030.04017.51
5.5.350.0030.04017.48
5.5.340.0030.04017.83
5.5.330.0000.04018.11
5.5.320.0130.04718.10
5.5.310.0100.03318.13
5.5.300.0100.03718.22
5.5.290.0070.03318.22
5.5.280.0130.07017.93
5.5.270.0070.08717.90
5.5.260.0130.08018.04
5.5.250.0070.07717.73
5.5.240.0000.04717.34
5.5.230.0070.08717.48
5.5.220.0070.06317.45
5.5.210.0070.07017.29
5.5.200.0030.04717.19
5.5.190.0030.08017.45
5.5.180.0100.08317.27
5.5.160.0030.07017.28
5.5.150.0070.07017.25
5.5.140.0070.04317.60
5.5.130.0070.03717.48
5.5.120.0000.05317.25
5.5.110.0170.02717.30
5.5.100.0100.07017.39
5.5.90.0070.05317.34
5.5.80.0070.04017.34
5.5.70.0070.04317.08
5.5.60.0100.07017.17
5.5.50.0200.06017.37
5.5.40.0030.06017.29
5.5.30.0000.04317.50
5.5.20.0130.06717.37
5.5.10.0000.04317.32
5.5.00.0100.04717.19
5.4.450.0070.07019.34
5.4.440.0030.08019.31
5.4.430.0070.04019.49
5.4.420.0030.08019.64
5.4.410.0100.08719.36
5.4.400.0070.07319.15
5.4.390.0070.04019.31
5.4.380.0170.06719.23
5.4.370.0100.04719.18
5.4.360.0070.04019.01
5.4.350.0100.06319.14
5.4.340.0030.05019.04
5.4.320.0100.07018.96
5.4.310.0130.06018.98
5.4.300.0070.03719.08
5.4.290.0070.07319.03
5.4.280.0130.03719.13
5.4.270.0070.05018.95
5.4.260.0200.05719.14
5.4.250.0000.05019.01
5.4.240.0100.07319.17
5.4.230.0000.08019.01
5.4.220.0030.05319.08
5.4.210.0170.06018.94
5.4.200.0000.05319.30
5.4.190.0070.05719.30
5.4.180.0070.08018.99
5.4.170.0070.04719.23
5.4.160.0070.07018.99
5.4.150.0070.07318.98
5.4.140.0070.03716.39
5.4.130.0100.06716.38
5.4.120.0030.07016.55
5.4.110.0130.06016.62
5.4.100.0030.06716.61
5.4.90.0170.05016.71
5.4.80.0100.07016.51
5.4.70.0030.07016.36
5.4.60.0030.07316.48
5.4.50.0030.03716.29
5.4.40.0030.06316.50
5.4.30.0000.06016.48
5.4.20.0000.03716.63
5.4.10.0100.03316.39
5.4.00.0170.03015.80
5.3.290.0030.05714.70
5.3.280.0030.04714.75
5.3.270.0170.05014.75
5.3.260.0030.07314.75
5.3.250.0030.08314.61
5.3.240.0070.08014.61
5.3.230.0070.04714.59
5.3.220.0030.07014.58
5.3.210.0030.06014.59
5.3.200.0100.06714.59
5.3.190.0030.04714.44
5.3.180.0070.04014.68
5.3.170.0000.04314.43
5.3.160.0030.08014.71
5.3.150.0030.04014.59
5.3.140.0070.03314.59
5.3.130.0070.04314.70
5.3.120.0000.06014.57
5.3.110.0070.04014.54
5.3.100.0030.03714.03
5.3.90.0030.03714.05
5.3.80.0000.04014.04
5.3.70.0030.03014.13
5.3.60.0000.03314.07
5.3.50.0030.03713.98
5.3.40.0000.05013.96
5.3.30.0030.03713.88
5.3.20.0030.03013.73
5.3.10.0000.03313.66
5.3.00.0000.07013.64
5.2.170.0000.03011.82
5.2.160.0000.03011.82
5.2.150.0000.03311.82
5.2.140.0100.06311.82
5.2.130.0070.02011.82
5.2.120.0000.03011.82
5.2.110.0000.03711.82
5.2.100.0030.03711.82
5.2.90.0030.06011.82
5.2.80.0030.06011.82
5.2.70.0030.06311.82
5.2.60.0030.05711.82
5.2.50.0000.06311.82
5.2.40.0000.06311.82
5.2.30.0000.03311.82
5.2.20.0100.05011.82
5.2.10.0070.05711.82
5.2.00.0070.06011.82
5.1.60.0030.02711.82
5.1.50.0070.04311.82
5.1.40.0030.02311.82
5.1.30.0030.02711.82
5.1.20.0070.06011.82
5.1.10.0070.02311.82
5.1.00.0030.03011.82
5.0.50.0000.05011.82
5.0.40.0030.02311.82
5.0.30.0000.03311.82
5.0.20.0030.01711.82
5.0.10.0000.03011.82
5.0.00.0030.03011.82
4.4.90.0070.03311.82
4.4.80.0000.02011.82
4.4.70.0030.03711.82
4.4.60.0030.03311.82
4.4.50.0000.03711.82
4.4.40.0070.04311.82
4.4.30.0000.02011.82
4.4.20.0000.02311.82
4.4.10.0000.03311.82
4.4.00.0030.02311.82
4.3.110.0030.03011.82
4.3.100.0100.00711.82
4.3.90.0100.02311.82
4.3.80.0000.04311.82
4.3.70.0070.01311.82
4.3.60.0030.01711.82
4.3.50.0030.03311.82
4.3.40.0000.03311.82
4.3.30.0000.03011.82
4.3.20.0030.03011.82
4.3.10.0030.02311.82
4.3.00.0030.02011.82

preferences:
53.63 ms | 400 KiB | 5 Q