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); echo $str; ?>

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.0120.00318.53
8.3.60.0120.00618.55
8.3.50.0100.00822.00
8.3.40.0110.00718.76
8.3.30.0070.00719.07
8.3.20.0050.00319.90
8.3.10.0060.00323.43
8.3.00.0080.00020.86
8.2.180.0110.01118.41
8.2.170.0090.00622.96
8.2.160.0140.00720.30
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0110.00326.16
8.2.120.0060.00319.23
8.2.110.0100.01422.25
8.2.100.0030.01017.91
8.2.90.0000.00819.20
8.2.80.0040.00417.97
8.2.70.0000.00817.80
8.2.60.0040.00418.28
8.2.50.0040.00418.10
8.2.40.0000.00719.38
8.2.30.0040.00418.18
8.2.20.0040.00417.60
8.2.10.0040.00418.13
8.2.00.0040.00417.82
8.1.280.0070.00725.92
8.1.270.0060.00324.02
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0100.00021.03
8.1.230.0040.00819.16
8.1.220.0040.00417.78
8.1.210.0000.00818.77
8.1.200.0030.00717.35
8.1.190.0080.00017.35
8.1.180.0000.00818.10
8.1.170.0040.00418.71
8.1.160.0000.00722.07
8.1.150.0000.00818.68
8.1.140.0050.00217.52
8.1.130.0000.00717.78
8.1.120.0040.00417.53
8.1.110.0080.00017.51
8.1.100.0040.00417.45
8.1.90.0040.00417.53
8.1.80.0070.00017.36
8.1.70.0070.00017.49
8.1.60.0030.00617.54
8.1.50.0050.00317.46
8.1.40.0100.00017.43
8.1.30.0030.00617.70
8.1.20.0000.00817.59
8.1.10.0040.00417.50
8.1.00.0080.00017.44
8.0.300.0090.00021.64
8.0.290.0040.00416.75
8.0.280.0030.00318.46
8.0.270.0060.00317.21
8.0.260.0030.00317.19
8.0.250.0060.00016.91
8.0.240.0030.00716.92
8.0.230.0000.00716.95
8.0.220.0030.00316.89
8.0.210.0030.00316.91
8.0.200.0000.00616.99
8.0.190.0000.00716.85
8.0.180.0040.00416.84
8.0.170.0000.00816.88
8.0.160.0030.00316.93
8.0.150.0040.00416.77
8.0.140.0040.00416.90
8.0.130.0050.00013.32
8.0.120.0000.00716.78
8.0.110.0040.00416.93
8.0.100.0000.00816.85
8.0.90.0050.00216.93
8.0.80.0090.00616.93
8.0.70.0000.00716.79
8.0.60.0000.00716.77
8.0.50.0080.00016.79
8.0.30.0080.01017.26
8.0.20.0100.00817.40
8.0.10.0080.00017.10
8.0.00.0110.00916.79
7.4.330.0050.00015.00
7.4.320.0030.00316.57
7.4.300.0060.00016.67
7.4.290.0030.00316.60
7.4.280.0070.00016.63
7.4.270.0030.00316.55
7.4.260.0070.00316.53
7.4.250.0000.00816.60
7.4.240.0020.00516.61
7.4.230.0050.00316.65
7.4.220.0130.01316.65
7.4.210.0070.00716.48
7.4.200.0040.00416.44
7.4.160.0120.00416.61
7.4.150.0120.00817.40
7.4.140.0090.00817.86
7.4.130.0060.01016.53
7.4.120.0060.01016.52
7.4.110.0140.01016.50
7.4.100.0120.00616.67
7.4.90.0070.01116.39
7.4.80.0070.01619.39
7.4.70.0090.01316.37
7.4.60.0100.01316.46
7.4.50.0000.00416.58
7.4.40.0070.01116.67
7.4.30.0080.00816.44
7.4.00.0020.01414.89
7.3.330.0080.00013.18
7.3.320.0000.00613.34
7.3.310.0030.00316.33
7.3.300.0070.00016.40
7.3.290.0110.00816.24
7.3.280.0060.01016.33
7.3.270.0110.00717.40
7.3.260.0080.00916.24
7.3.250.0150.00516.49
7.3.240.0100.00716.68
7.3.230.0060.00916.39
7.3.210.0160.00316.26
7.3.200.0120.00619.39
7.3.190.0160.00816.64
7.3.180.0160.00016.26
7.3.170.0110.00416.44
7.3.160.0030.01316.41
7.3.120.0090.00714.76
7.3.110.0070.00714.85
7.3.100.0030.01314.90
7.3.90.0000.00915.04
7.3.80.0030.00715.14
7.3.70.0070.01114.86
7.3.60.0060.00314.99
7.3.50.0070.00614.91
7.3.40.0070.00314.76
7.3.30.0040.00814.96
7.3.20.0040.00716.68
7.3.10.0030.00616.54
7.3.00.0080.00016.61
7.2.330.0100.00716.77
7.2.320.0040.01416.82
7.2.310.0120.00616.85
7.2.300.0100.00716.71
7.2.290.0130.00316.81
7.2.250.0060.01215.20
7.2.240.0100.00315.42
7.2.230.0070.00715.36
7.2.220.0000.01114.89
7.2.210.0050.00515.04
7.2.200.0080.00415.00
7.2.190.0000.01315.11
7.2.180.0060.00915.28
7.2.170.0030.00815.13
7.2.60.0030.00917.04
7.2.00.0070.01019.36
7.1.330.0070.00316.00
7.1.320.0040.00715.81
7.1.310.0030.00715.78
7.1.300.0030.01015.69
7.1.290.0040.00815.86
7.1.280.0100.00316.02
7.1.270.0080.00415.82
7.1.260.0040.00715.49
7.1.200.0030.00915.88
7.1.100.0080.00418.00
7.1.70.0000.00818.33
7.1.60.0030.00718.33
7.1.50.0090.00318.33
7.1.40.0090.00318.33
7.1.30.0080.00418.33
7.1.20.0000.01118.33
7.1.10.0060.00318.33
7.1.00.0340.01318.33
7.0.200.0040.00418.33
7.0.190.0040.00418.33
7.0.180.0000.01118.33
7.0.170.0040.00418.33
7.0.160.0100.00018.33
7.0.150.0070.00718.33
7.0.140.0490.00318.33
7.0.130.0500.00718.33
7.0.120.0450.01018.33
7.0.110.0440.00318.33
7.0.100.0430.00418.33
7.0.90.0560.00718.33
7.0.80.0530.00418.33
7.0.70.0040.00418.33
7.0.60.0040.00418.33
7.0.50.0000.00818.33
7.0.40.0000.00818.33
7.0.30.0000.01118.33
7.0.20.0050.00518.33
7.0.10.0070.00718.33
7.0.00.0030.01318.33
5.6.300.0100.05220.84
5.6.290.0030.04420.96
5.6.280.0140.04120.95
5.6.270.0060.04220.98
5.6.260.0100.03821.04
5.6.250.0060.04520.88
5.6.240.0000.05220.96
5.6.230.0160.04420.82
5.6.220.0070.03920.80
5.6.210.0030.04621.16
5.6.200.0100.04721.06
5.6.190.0040.04920.87
5.6.180.0230.05521.00
5.6.170.0060.05221.06
5.6.160.0190.05421.00
5.6.150.0030.04521.00
5.6.140.0030.05421.03
5.6.130.0070.04420.74
5.6.120.0110.04221.05
5.6.110.0100.04920.93
5.6.100.0100.04920.82
5.6.90.0030.04820.83
5.6.80.0170.06320.38
5.6.70.0140.03920.27
5.6.60.0070.03820.21
5.6.50.0070.04120.38
5.6.40.0070.04020.19
5.6.30.0030.04420.19
5.6.20.0130.04520.35
5.6.10.0040.04120.23
5.6.00.0070.04420.27
5.5.380.0130.03718.33
5.5.370.0070.07518.33
5.5.360.0070.04118.33
5.5.350.0030.05018.33
5.5.340.0100.03618.33
5.5.330.0060.04818.33
5.5.320.0130.03518.33
5.5.310.0030.05018.33
5.5.300.0040.05118.33
5.5.290.0030.04418.33
5.5.280.0070.04318.33
5.5.270.0070.03918.33
5.5.260.0030.04718.33
5.5.250.0000.05018.33
5.5.240.0070.05918.33
5.5.230.0070.03718.33
5.5.220.0030.04318.33
5.5.210.0100.03518.33
5.5.200.0030.03818.33
5.5.190.0000.05318.33
5.5.180.0070.03818.33
5.5.160.0030.04218.33
5.5.150.0000.04418.33
5.5.140.0030.03918.33
5.5.130.0000.04218.33
5.5.120.0030.04618.33
5.5.110.0140.04118.33
5.5.100.0300.04318.33
5.5.90.0070.03418.33
5.5.80.0090.03518.33
5.5.70.0170.04018.33
5.5.60.0070.04018.33
5.5.50.0030.04718.33
5.5.40.0130.04518.33
5.5.30.0000.04618.33
5.5.20.0130.03618.33
5.5.10.0070.03918.33
5.5.00.0000.04318.33
5.4.450.0090.04119.41
5.4.440.0070.04019.46
5.4.430.0160.05019.55
5.4.420.0030.04819.30
5.4.410.0000.06419.37
5.4.400.0030.04618.98
5.4.390.0040.04619.14
5.4.380.0030.04519.12
5.4.370.0000.04719.16
5.4.360.0090.03418.95
5.4.350.0040.03918.98
5.4.340.0030.04318.98
5.4.320.0070.04718.89
5.4.310.0070.04219.15
5.4.300.0040.03919.00
5.4.290.0120.03419.21
5.4.280.0030.04419.13
5.4.270.0000.04619.07
5.4.260.0000.04319.20
5.4.250.0130.03519.11
5.4.240.0030.04319.20
5.4.230.0070.03718.95
5.4.220.0030.04319.06
5.4.210.0070.04118.91
5.4.200.0030.04219.23
5.4.190.0070.03719.08
5.4.180.0100.03818.95
5.4.170.0140.03219.10
5.4.160.0130.03619.15
5.4.150.0130.03719.16
5.4.140.0040.04218.33
5.4.130.0000.04318.33
5.4.120.0000.04818.33
5.4.110.0000.04018.33
5.4.100.0070.03818.33
5.4.90.0090.03118.33
5.4.80.0060.03218.33
5.4.70.0000.03918.33
5.4.60.0070.03318.33
5.4.50.0040.04018.33
5.4.40.0140.02818.33
5.4.30.0160.05318.33
5.4.20.0070.03418.33
5.4.10.0070.03918.33
5.4.00.0100.06018.33
5.3.290.0030.04118.33
5.3.280.0040.04318.33
5.3.270.0070.04218.33
5.3.260.0210.04818.33
5.3.250.0000.04818.33
5.3.240.0070.04718.33
5.3.230.0030.04018.33
5.3.220.0130.02818.33
5.3.210.0070.03918.33
5.3.200.0100.03418.33
5.3.190.0090.04018.33
5.3.180.0060.03918.33
5.3.170.0070.04418.33
5.3.160.0060.03818.33
5.3.150.0100.03118.33
5.3.140.0060.03818.33
5.3.130.0040.03918.33
5.3.120.0030.04418.33
5.3.110.0070.03718.33
5.3.100.0030.04018.33
5.3.90.0000.04118.33
5.3.80.0030.04118.33
5.3.70.0060.03518.33
5.3.60.0000.04118.33
5.3.50.0100.03318.33
5.3.40.0100.04018.33
5.3.30.0040.04218.33
5.3.20.0040.03618.33
5.3.10.0060.03918.33
5.3.00.0040.03918.33
5.2.170.0000.04318.33
5.2.160.0070.02718.33
5.2.150.0090.02518.33
5.2.140.0040.03218.33
5.2.130.0130.03918.33
5.2.120.0100.02618.33
5.2.110.0090.02618.33
5.2.100.0100.02418.33
5.2.90.0090.02818.33
5.2.80.0030.03118.33
5.2.70.0090.02718.33
5.2.60.0000.03218.33
5.2.50.0120.02418.33
5.2.40.0000.03218.33
5.2.30.0040.03218.33
5.2.20.0030.03118.33
5.2.10.0090.02418.33
5.2.00.0070.03118.33
5.1.60.0030.02718.33
5.1.50.0090.02018.33
5.1.40.0000.02818.33
5.1.30.0320.02818.33
5.1.20.0090.02018.33
5.1.10.0070.02318.33
5.1.00.0070.02418.33
5.0.50.0000.02718.33
5.0.40.0000.02818.33
5.0.30.0040.03218.33
5.0.20.0000.02118.33
5.0.10.0000.02318.33
5.0.00.0000.03318.33
4.4.90.0000.01918.33
4.4.80.0030.01618.33
4.4.70.0000.01718.33
4.4.60.0030.01618.33
4.4.50.0040.01518.33
4.4.40.0030.02918.33
4.4.30.0030.01618.33
4.4.20.0030.01518.33
4.4.10.0030.01618.33
4.4.00.0060.02318.33
4.3.110.0070.01218.33
4.3.100.0000.02018.33
4.3.90.0000.01718.33
4.3.80.0150.01818.33
4.3.70.0030.01718.33
4.3.60.0000.01618.33
4.3.50.0000.01718.33
4.3.40.0000.02818.33
4.3.30.0030.01518.33
4.3.20.0030.01618.33
4.3.10.0030.01418.33
4.3.00.0030.01918.33

preferences:
41.4 ms | 401 KiB | 5 Q