3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A implements Serializable { public function serialize () { $serialized = array(); foreach($this as $prop => $val) { $serialized[$prop] = $val; } return serialize($serialized); //return serialize(get_object_vars($this)); } function unserialize($serialized) { foreach(unserialize($serialized) as $prop => $val) { $this->$prop = $val; } return true; } } class B extends A { public $A; } class C extends A { public $A; public $B; } $oC = new C(); $oC->A = new A(); $oC->B = new B(); $oC->B->A = $oC->A; echo $oC->A === $oC->B->A ? "yes" : "no", "\n"; echo serialize($oC->A) === serialize($oC->B->A) ? 'yes' : 'no', "\n"; $ser = serialize($oC); $new_oC = unserialize($ser); echo $new_oC->A === $new_oC->B->A ? "yes" : "no", "\n";

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.0150.00318.68
8.3.30.0110.00418.84
8.3.20.0060.00318.80
8.3.10.0040.00418.73
8.3.00.0000.00919.23
8.2.170.0060.00922.96
8.2.160.0060.00921.20
8.2.150.0080.00024.18
8.2.140.0000.00924.66
8.2.130.0080.00826.16
8.2.120.0040.00420.82
8.2.110.0060.00322.09
8.2.100.0040.00717.84
8.2.90.0090.00019.26
8.2.80.0040.00419.37
8.2.70.0040.00417.75
8.2.60.0040.00418.05
8.2.50.0040.00419.35
8.2.40.0050.00318.16
8.2.30.0030.00518.20
8.2.20.0000.00917.66
8.2.10.0000.00717.68
8.2.00.0030.00517.84
8.1.270.0060.00324.66
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0070.00319.28
8.1.230.0040.00820.97
8.1.220.0040.00418.77
8.1.210.0040.00418.97
8.1.200.0040.00417.35
8.1.190.0000.00917.52
8.1.180.0000.00818.10
8.1.170.0060.00318.90
8.1.160.0040.00418.97
8.1.150.0020.00518.68
8.1.140.0000.00717.60
8.1.130.0030.00317.86
8.1.120.0040.00417.46
8.1.110.0000.00817.52
8.1.100.0040.00417.39
8.1.90.0000.00717.46
8.1.80.0040.00417.56
8.1.70.0040.00417.46
8.1.60.0030.00517.62
8.1.50.0040.00417.49
8.1.40.0000.00817.58
8.1.30.0040.00417.68
8.1.20.0040.00417.70
8.1.10.0040.00417.51
8.1.00.0040.00417.59
8.0.300.0040.00419.98
8.0.290.0000.00716.75
8.0.280.0000.00818.49
8.0.270.0000.00817.32
8.0.260.0030.00316.84
8.0.250.0000.00817.06
8.0.240.0030.00317.09
8.0.230.0000.00717.04
8.0.220.0070.00016.98
8.0.210.0030.00616.98
8.0.200.0070.00017.03
8.0.190.0070.00017.05
8.0.180.0070.00417.02
8.0.170.0050.00316.99
8.0.160.0020.00517.06
8.0.150.0080.00016.93
8.0.140.0030.00616.96
8.0.130.0000.00513.41
8.0.120.0020.00516.84
8.0.110.0040.00416.97
8.0.100.0040.00416.88
8.0.90.0080.00016.90
8.0.80.0080.00816.96
8.0.70.0050.00217.03
8.0.60.0040.00416.98
8.0.50.0080.00017.04
8.0.30.0060.01216.97
8.0.20.0060.01217.25
8.0.10.0040.00417.10
8.0.00.0160.00716.76
7.4.330.0060.00013.04
7.4.320.0030.00316.50
7.4.300.0070.00016.61
7.4.290.0110.00016.63
7.4.280.0070.00016.53
7.4.270.0000.00716.53
7.4.260.0030.00313.31
7.4.250.0040.00416.61
7.4.240.0070.00016.69
7.4.230.0030.00316.71
7.4.220.0070.01316.60
7.4.210.0060.01216.58
7.4.200.0040.00416.54
7.4.190.0040.00416.40
7.4.160.0110.00616.32
7.4.150.0130.00416.35
7.4.140.0110.00816.57
7.4.130.0100.00716.59
7.4.120.0090.00816.39
7.4.110.0120.01116.44
7.4.100.0130.01016.65
7.4.90.0110.00916.52
7.4.80.0110.01116.70
7.4.70.0080.00816.41
7.4.60.0100.00616.60
7.4.50.0060.00616.54
7.4.40.0060.01016.44
7.4.30.0090.00816.54
7.4.00.0070.01014.66
7.3.330.0080.00013.27
7.3.320.0030.00313.36
7.3.310.0000.00716.45
7.3.300.0030.00316.45
7.3.290.0070.00716.40
7.3.280.0090.00716.39
7.3.270.0030.01516.37
7.3.260.0110.00616.52
7.3.250.0090.01216.56
7.3.240.0040.01716.51
7.3.230.0090.00916.61
7.3.210.0190.00916.55
7.3.200.0030.01319.39
7.3.190.0060.01016.38
7.3.180.0030.01316.47
7.3.170.0090.01416.70
7.3.160.0030.01316.48
7.3.120.0100.00815.02
7.3.110.0100.01015.04
7.3.100.0040.01114.80
7.3.90.0100.00715.02
7.3.80.0130.00014.92
7.3.70.0060.00915.06
7.3.60.0100.00314.93
7.3.50.0080.00415.01
7.3.40.0040.01114.68
7.3.30.0000.01114.96
7.3.20.0140.00016.56
7.3.10.0000.01216.71
7.3.00.0070.01116.66
7.2.330.0120.00616.84
7.2.320.0030.01416.74
7.2.310.0100.01316.83
7.2.300.0080.01416.81
7.2.290.0110.00516.67
7.2.250.0060.01315.35
7.2.240.0090.00915.06
7.2.230.0100.00615.28
7.2.220.0090.00614.91
7.2.210.0090.00315.26
7.2.200.0040.01115.26
7.2.190.0080.00415.12
7.2.180.0040.00815.04
7.2.170.0040.00715.12
7.2.00.0100.00719.27
7.1.330.0030.01015.98
7.1.320.0100.00315.54
7.1.310.0030.01316.18
7.1.300.0000.01015.77
7.1.290.0030.01215.92
7.1.280.0000.01415.77
7.1.270.0090.00415.96
7.1.260.0030.01015.60
7.1.200.0070.00715.93
7.1.100.0030.01218.18
7.1.70.0060.00317.24
7.1.60.0100.01319.40
7.1.50.0100.01316.79
7.1.00.0000.06322.57
7.0.200.0000.01014.98
7.0.140.0130.06321.96
7.0.120.0000.07022.03
7.0.60.0130.08019.88
7.0.50.0100.05317.89
7.0.40.0070.08720.02
7.0.30.0270.03720.21
7.0.20.0270.07720.24
7.0.10.0270.05720.16
7.0.00.0100.07320.09
5.6.280.0030.07321.08
5.6.210.0270.06320.72
5.6.200.0100.05318.13
5.6.190.0030.06020.43
5.6.180.0370.07720.42
5.6.170.0200.05720.52
5.6.160.0000.04320.54
5.6.150.0000.04318.19
5.6.140.0130.07318.21
5.6.130.0030.08318.13
5.6.120.0100.06721.02
5.6.110.0070.08321.10
5.6.100.0200.06020.95
5.6.90.0070.09021.12
5.6.80.0200.07020.52
5.5.350.0400.07020.42
5.5.340.0070.08318.01
5.5.330.0030.08720.37
5.5.320.0070.05020.36
5.5.310.0300.07320.30
5.5.300.0100.07018.02
5.5.290.0170.07718.01
5.5.280.0170.06720.76
5.5.270.0070.06320.66
5.5.260.0130.07720.82
5.5.250.0130.08020.63
5.5.240.0070.07720.37
5.4.450.0070.05719.30
5.4.440.0100.05019.47
5.4.430.0000.05319.46
5.4.420.0000.05019.30
5.4.410.0100.07719.42
5.4.400.0100.03719.08
5.4.390.0000.04319.12
5.4.380.0030.04319.01
5.4.370.0130.07318.98
5.4.360.0170.06718.87
5.4.350.0070.07318.98
5.4.340.0070.05319.00
5.4.320.0100.06318.92
5.4.310.0000.07019.15
5.4.300.0030.03719.08
5.4.290.0000.04019.14
5.4.280.0000.07319.23
5.4.270.0070.03719.14
5.4.260.0130.07719.25
5.4.250.0030.05018.91
5.4.240.0100.07018.99
5.4.230.0170.02719.19
5.4.220.0070.06019.20
5.4.210.0030.05318.84
5.4.200.0130.06719.14
5.4.190.0070.08018.84
5.4.180.0100.07718.95
5.4.170.0100.05018.86
5.4.160.0030.08319.23
5.4.150.0070.04719.21
5.4.140.0070.07716.55
5.4.130.0130.03716.55
5.4.120.0000.06016.39
5.4.110.0000.04716.47
5.4.100.0070.03316.48
5.4.90.0070.03316.33
5.4.80.0030.03316.51
5.4.70.0070.04016.71
5.4.60.0030.03316.31
5.4.50.0030.03316.50
5.4.40.0030.03716.44
5.4.30.0030.03716.64
5.4.20.0000.03716.38
5.4.10.0000.04016.40
5.4.00.0030.04715.75
5.3.290.0070.04714.72
5.3.280.0030.08014.63
5.3.270.0030.07714.63
5.3.260.0030.08314.66
5.3.250.0070.05714.68
5.3.240.0070.06314.71
5.3.230.0100.07314.64
5.3.220.0100.03314.60
5.3.210.0130.06314.59
5.3.200.0070.04714.60
5.3.190.0030.03714.62
5.3.180.0030.03714.60
5.3.170.0070.03314.48
5.3.160.0000.03714.64
5.3.150.0070.03314.65
5.3.140.0030.03714.61
5.3.130.0130.03314.59
5.3.120.0100.03014.59
5.3.110.0130.02714.61
5.3.100.0000.04014.09
5.3.90.0030.03313.93
5.3.80.0030.03314.05
5.3.70.0070.03314.04
5.3.60.0000.03713.98
5.3.50.0000.04014.12
5.3.40.0070.03313.97
5.3.30.0030.03313.95
5.3.20.0070.03713.88
5.3.10.0000.04713.73
5.3.00.0030.03313.70
5.2.170.0000.03011.24
5.2.160.0100.02011.12
5.2.150.0000.03311.20
5.2.140.0000.03011.14
5.2.130.0000.03011.02
5.2.120.0070.02311.02
5.2.110.0070.02311.08
5.2.100.0000.03311.17
5.2.90.0000.03011.29
5.2.80.0000.03011.16
5.2.70.0030.02711.29
5.2.60.0000.03311.14
5.2.50.0000.03011.07
5.2.40.0000.03011.08
5.2.30.0000.03011.16
5.2.20.0030.02711.15
5.2.10.0000.03010.89
5.2.00.0000.03010.82
5.1.60.0000.0279.94
5.1.50.0030.0239.94
5.1.40.0000.02310.05
5.1.30.0030.02710.44
5.1.20.0000.02710.39
5.1.10.0000.02710.25
5.1.00.0000.02710.06
5.0.50.0070.0178.63
5.0.40.0000.0208.34
5.0.30.0000.0578.30
5.0.20.0000.0308.13
5.0.10.0070.0408.23
5.0.00.0070.0578.16
4.4.90.0030.0138.02
4.4.80.0000.0178.02
4.4.70.0000.0178.02
4.4.60.0000.0178.02
4.4.50.0000.0178.02
4.4.40.0000.0278.02
4.4.30.0070.0108.02
4.4.20.0000.0178.02
4.4.10.0000.0178.02
4.4.00.0000.0238.02
4.3.110.0030.0208.02
4.3.100.0030.0178.02
4.3.90.0030.0378.02
4.3.80.0000.0378.02
4.3.70.0030.0338.02
4.3.60.0070.0238.02
4.3.50.0000.0238.02
4.3.40.0030.0408.02
4.3.30.0000.0208.02
4.3.20.0000.0308.02
4.3.10.0000.0308.02
4.3.00.0030.0278.02

preferences:
44.54 ms | 400 KiB | 5 Q