3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HelloWorld implements Serializable { public $test; public function __construct($str) { $this->test = $str; } public function serialize() { $simple = null; $simple = new Simple(); $simple->test = $this->test; return serialize($simple); } public function unserialize($str) { $simple = unserialize($str); $this->test = $simple->test; } } class Simple { public $test; } $list = array( new HelloWorld('str1'), new HelloWorld('str2'), new HelloWorld('str3'), new HelloWorld('str4'), new HelloWorld('str5'), new HelloWorld('str6'), new HelloWorld('str7'), new HelloWorld('str8'), new HelloWorld('str9'), ); $str = serialize($list); ?>

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.0040.01118.43
8.3.50.0080.01021.14
8.3.40.0070.01118.71
8.3.30.0140.00020.35
8.3.20.0080.00020.09
8.3.10.0090.00020.92
8.3.00.0040.00422.44
8.2.180.0140.00316.75
8.2.170.0000.01518.91
8.2.160.0060.00922.96
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0020.00526.16
8.2.120.0030.00619.49
8.2.110.0070.00220.75
8.2.100.0060.00617.84
8.2.90.0050.00319.29
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0050.00318.03
8.2.50.0030.00618.07
8.2.40.0000.00818.34
8.2.30.0030.00619.45
8.2.20.0040.00417.71
8.2.10.0040.00417.77
8.2.00.0000.00817.85
8.1.280.0140.00325.92
8.1.270.0120.00022.14
8.1.260.0080.00026.35
8.1.250.0110.00328.09
8.1.240.0090.00019.58
8.1.230.0040.00820.97
8.1.220.0080.00018.77
8.1.210.0040.00419.00
8.1.200.0060.00317.36
8.1.190.0040.00417.53
8.1.180.0080.00318.10
8.1.170.0040.00418.59
8.1.160.0000.00818.90
8.1.150.0040.00418.66
8.1.140.0040.00417.39
8.1.130.0000.00717.80
8.1.120.0040.00417.38
8.1.110.0040.00417.45
8.1.100.0000.00817.38
8.1.90.0070.00017.54
8.1.80.0030.00517.44
8.1.70.0000.00817.51
8.1.60.0000.00817.52
8.1.50.0000.00717.45
8.1.40.0030.00517.52
8.1.30.0040.00417.62
8.1.20.0040.00417.64
8.1.10.0040.00417.64
8.1.00.0100.00017.39
8.0.300.0040.00419.89
8.0.290.0050.00217.18
8.0.280.0040.00418.54
8.0.270.0070.00017.28
8.0.260.0030.00316.86
8.0.250.0030.00316.95
8.0.240.0040.00617.02
8.0.230.0080.00016.98
8.0.220.0000.00716.91
8.0.210.0000.00716.92
8.0.200.0000.00616.97
8.0.190.0000.00716.87
8.0.180.0000.00716.84
8.0.170.0080.00016.97
8.0.160.0050.00316.79
8.0.150.0030.00316.88
8.0.140.0040.00416.79
8.0.130.0060.00013.28
8.0.120.0060.00316.89
8.0.110.0040.00416.70
8.0.100.0050.00216.96
8.0.90.0040.00416.71
8.0.80.0100.00616.95
8.0.70.0050.00216.82
8.0.60.0000.00716.98
8.0.50.0040.00416.98
8.0.30.0070.01117.11
8.0.20.0140.00717.40
8.0.10.0050.00317.09
8.0.00.0120.00716.81
7.4.330.0000.00516.89
7.4.320.0000.00616.54
7.4.300.0000.00616.63
7.4.290.0030.00316.52
7.4.280.0050.00216.47
7.4.270.0050.00316.48
7.4.260.0030.00313.30
7.4.250.0080.00016.41
7.4.240.0000.00716.54
7.4.230.0000.00716.73
7.4.220.0060.01216.62
7.4.210.0080.00816.55
7.4.200.0000.00716.43
7.4.190.0070.00016.39
7.4.160.0070.00716.47
7.4.150.0150.00317.40
7.4.140.0100.00717.86
7.4.130.0100.00716.53
7.4.120.0070.01116.60
7.4.110.0040.01716.76
7.4.100.0090.00916.69
7.4.90.0100.00716.43
7.4.80.0100.00719.39
7.4.70.0120.00616.59
7.4.60.0160.00016.67
7.4.50.0030.00616.20
7.4.40.0110.00422.77
7.4.30.0070.01016.60
7.4.00.0070.00714.98
7.3.330.0050.00013.32
7.3.320.0000.00513.32
7.3.310.0070.00016.38
7.3.300.0000.00716.24
7.3.290.0090.00416.34
7.3.280.0070.01016.31
7.3.270.0060.01217.40
7.3.260.0030.01318.24
7.3.250.0090.00916.47
7.3.240.0110.00716.47
7.3.230.0130.00316.58
7.3.210.0060.01016.55
7.3.200.0110.00719.39
7.3.190.0110.00516.46
7.3.180.0100.00616.29
7.3.170.0070.01116.37
7.3.160.0100.00716.52
7.3.120.0060.00914.72
7.3.10.0030.00616.16
7.3.00.0090.00616.37
7.2.330.0030.01716.86
7.2.320.0110.01416.54
7.2.310.0090.01116.64
7.2.300.0030.01216.63
7.2.290.0090.00916.75
7.2.130.0090.00616.57
7.2.120.0090.00616.91
7.2.110.0040.01116.46
7.2.100.0000.01516.67
7.2.90.0030.01016.73
7.2.80.0000.01416.80
7.2.70.0080.00416.96
7.2.60.0060.00616.93
7.2.50.0060.00316.89
7.2.40.0070.01017.15
7.2.30.0070.00416.64
7.2.20.0000.01116.86
7.2.10.0030.01017.08
7.2.00.0060.00818.12
7.1.250.0040.00715.52
7.1.200.0000.01115.37
7.1.100.0030.00918.21
7.1.70.0030.00717.07
7.1.60.0130.01019.17
7.1.50.0070.01716.63
7.1.00.0030.07022.46
7.0.200.0000.00816.80
7.0.140.0030.07321.94
7.0.60.0330.06720.04
7.0.50.0070.04017.95
7.0.40.0030.04320.30
7.0.30.0200.04720.06
7.0.20.0330.08720.12
7.0.10.0100.05020.24
7.0.00.0070.04320.09
5.6.280.0070.07021.09
5.6.210.0030.04020.54
5.6.200.0030.04018.18
5.6.190.0000.05320.46
5.6.180.0530.03020.34
5.6.170.0330.07720.57
5.6.160.0070.09020.54
5.6.150.0100.05718.29
5.6.140.0130.07018.19
5.6.130.0100.08318.25
5.6.120.0130.07320.98
5.6.110.0070.05321.05
5.6.100.0030.09021.12
5.6.90.0100.08021.00
5.6.80.0130.07320.39
5.5.350.0330.07320.45
5.5.340.0030.07318.07
5.5.330.0030.08720.39
5.5.320.0170.04020.42
5.5.310.0130.04320.39
5.5.300.0030.08317.98
5.5.290.0030.09017.96
5.5.280.0130.04320.88
5.5.270.0070.08020.76
5.5.260.0070.08720.78
5.5.250.0130.07320.71
5.5.240.0000.04020.20
5.4.450.3430.05019.45
5.4.440.0170.03019.26
5.4.430.1270.04319.46
5.4.420.3870.03319.27
5.4.410.4000.03319.38
5.4.400.3600.03319.21
5.4.390.2030.03719.18
5.4.380.3670.04318.99
5.4.370.0070.03318.95
5.4.360.0000.04019.14
5.4.350.3700.03719.07
5.4.340.3830.03719.22
5.4.320.4000.04319.07
5.4.310.3530.03719.11
5.4.300.4200.03019.10
5.4.290.3970.03719.14
5.4.280.4430.04019.12
5.4.270.0100.04719.10
5.4.260.0830.05318.95
5.4.250.4230.03318.96
5.4.240.3900.03318.92
5.4.230.4070.03019.20
5.4.220.3770.04019.20
5.4.210.3870.03319.14
5.4.200.4070.03019.06
5.4.190.4670.03319.17
5.4.180.4470.03719.03
5.4.170.4470.03719.13
5.4.160.3830.03319.02
5.4.150.4030.02719.13
5.4.140.3730.03016.41
5.4.130.4000.04016.30
5.4.120.3830.04316.40
5.4.110.4500.04716.45
5.4.100.4600.05316.50
5.4.90.4630.03016.31
5.4.80.4630.02716.59
5.4.70.4470.04016.39
5.4.60.4200.04016.23
5.4.50.4030.03016.22
5.4.40.3970.03316.51
5.4.30.4000.03716.50
5.4.20.4600.02716.45
5.4.10.4570.04016.32
5.4.00.4270.03715.89
5.3.290.3370.04314.70
5.3.280.4070.03714.61
5.3.270.4100.04014.67
5.3.260.3870.04714.62
5.3.250.3570.04314.67
5.3.240.3800.04014.64
5.3.230.3830.03314.62
5.3.220.3670.03314.72
5.3.210.4230.03714.59
5.3.200.3700.04014.61
5.3.190.4100.03314.63
5.3.180.4200.04014.49
5.3.170.4500.03714.60
5.3.160.3830.04014.49
5.3.150.3500.03714.73
5.3.140.4000.03714.60
5.3.130.4770.04014.59
5.3.120.4530.03714.48
5.3.110.4400.04014.48
5.3.100.4570.04014.19
5.3.90.4070.04013.95
5.3.80.4630.03714.08
5.3.70.4370.04313.99
5.3.60.4200.04014.16
5.3.50.4100.04314.10
5.3.40.4500.04013.89
5.3.30.4370.03313.89
5.3.20.4270.03313.86
5.3.10.4370.03713.66
5.3.00.4600.03013.72
5.2.170.3730.03011.19
5.2.160.3770.02711.13
5.2.150.3500.02711.16
5.2.140.3730.03011.11
5.2.130.3600.03711.27
5.2.120.3830.03011.26
5.2.110.3530.02311.00
5.2.100.3230.02711.11
5.2.90.3000.02711.12
5.2.80.3300.02311.17
5.2.70.3300.02311.18
5.2.60.3930.02711.22
5.2.50.4030.01710.98
5.2.40.3200.02011.14
5.2.30.3200.02711.00
5.2.20.2800.02710.86
5.2.10.2970.03310.93
5.2.00.3030.03310.73
5.1.60.3100.0279.98
5.1.50.2270.02310.02
5.1.40.2400.0239.96
5.1.30.2400.02710.30
5.1.20.2400.02310.34
5.1.10.2070.02710.15
5.1.00.2370.02310.13
5.0.50.1200.0178.57
5.0.40.1330.0208.49
5.0.30.1200.0308.29
5.0.20.1200.0208.18
5.0.10.1230.0178.19
5.0.00.1200.0308.22
4.4.90.1730.0136.20
4.4.80.1870.0106.20
4.4.70.1730.0176.20
4.4.60.1530.0176.20
4.4.50.1830.0136.20
4.4.40.1530.0236.20
4.4.30.1200.0136.20
4.4.20.1200.0136.20
4.4.10.1170.0136.20
4.4.00.1200.0236.20
4.3.110.1170.0136.20
4.3.100.1230.0136.20
4.3.90.1370.0136.20
4.3.80.1200.0236.20
4.3.70.1170.0176.20
4.3.60.1200.0176.20
4.3.50.1200.0176.20
4.3.40.0870.0236.20
4.3.30.0570.0176.20
4.3.20.0600.0176.20
4.3.10.0700.0136.20
4.3.00.0600.0136.20

preferences:
43.97 ms | 401 KiB | 5 Q