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); echo $ser, "\n"; $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.60.0110.00718.43
8.3.50.0090.00716.64
8.3.40.0140.00018.82
8.3.30.0100.00618.79
8.3.20.0050.00318.85
8.3.10.0050.00320.66
8.3.00.0040.00417.75
8.2.180.0160.01016.88
8.2.170.0210.00022.96
8.2.160.0130.00722.14
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00419.91
8.2.110.0060.00319.30
8.2.100.0100.00617.52
8.2.90.0030.00519.30
8.2.80.0040.00418.03
8.2.70.0030.00617.50
8.2.60.0000.00818.04
8.2.50.0000.00818.07
8.2.40.0080.00018.14
8.2.30.0030.00518.16
8.2.20.0040.00417.82
8.2.10.0000.00717.84
8.2.00.0040.00417.77
8.1.280.0110.00425.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0100.00022.02
8.1.230.0080.00320.92
8.1.220.0000.00818.51
8.1.210.0000.00818.77
8.1.200.0060.00317.22
8.1.190.0040.00417.63
8.1.180.0030.00618.10
8.1.170.0000.00818.82
8.1.160.0040.00418.98
8.1.150.0000.00818.58
8.1.140.0000.00717.44
8.1.130.0030.00517.95
8.1.120.0080.00017.46
8.1.110.0000.00717.53
8.1.100.0040.00417.47
8.1.90.0000.00717.41
8.1.80.0030.00417.51
8.1.70.0070.00017.36
8.1.60.0090.00017.51
8.1.50.0000.00817.57
8.1.40.0060.00317.59
8.1.30.0050.00317.70
8.1.20.0000.00817.54
8.1.10.0040.00417.61
8.1.00.0000.00717.54
8.0.300.0040.00419.83
8.0.290.0070.00416.75
8.0.280.0000.00718.41
8.0.270.0000.00717.35
8.0.260.0040.00218.70
8.0.250.0050.00317.08
8.0.240.0050.00816.95
8.0.230.0040.00416.96
8.0.220.0000.00716.85
8.0.210.0060.00316.92
8.0.200.0040.00416.94
8.0.190.0000.00717.02
8.0.180.0040.00417.04
8.0.170.0000.00917.07
8.0.160.0040.00417.01
8.0.150.0040.00416.89
8.0.140.0090.00016.97
8.0.130.0030.00613.43
8.0.120.0050.00316.93
8.0.110.0000.00716.88
8.0.100.0050.00316.93
8.0.90.0000.00716.81
8.0.80.0070.01516.92
8.0.70.0040.00416.80
8.0.60.0030.00517.05
8.0.50.0020.00616.95
8.0.30.0120.00617.17
8.0.20.0150.00517.10
8.0.10.0000.00716.93
8.0.00.0130.00616.80
7.4.330.0060.00014.89
7.4.320.0030.00316.48
7.4.300.0040.00416.43
7.4.290.0070.00016.59
7.4.280.0000.00816.53
7.4.270.0030.00316.54
7.4.260.0050.00313.31
7.4.250.0030.00616.52
7.4.240.0040.00416.69
7.4.230.0000.00716.70
7.4.220.0130.00716.43
7.4.210.0070.00816.56
7.4.200.0000.00716.54
7.4.190.0000.00716.65
7.4.160.0090.00616.70
7.4.150.0060.01117.07
7.4.140.0160.00317.18
7.4.130.0130.00316.48
7.4.120.0080.00916.62
7.4.110.0110.00716.54
7.4.100.0120.00616.55
7.4.90.0150.00316.52
7.4.80.0030.01418.80
7.4.70.0110.00716.34
7.4.60.0040.01416.66
7.4.50.0030.00316.64
7.4.40.0060.00922.27
7.4.30.0060.01016.31
7.4.00.0060.00614.98
7.3.330.0030.00313.43
7.3.320.0000.00613.21
7.3.310.0030.00316.51
7.3.300.0030.00316.32
7.3.290.0060.01316.39
7.3.280.0060.00916.40
7.3.270.0130.00617.07
7.3.260.0100.00718.24
7.3.250.0170.00316.59
7.3.240.0130.00716.46
7.3.230.0110.00616.46
7.3.210.0030.01416.49
7.3.200.0090.00919.39
7.3.190.0100.00716.39
7.3.180.0090.00916.67
7.3.170.0060.01016.50
7.3.160.0120.00416.59
7.3.120.0110.00714.89
7.3.110.0080.01214.84
7.3.100.0030.01315.09
7.3.90.0040.00814.73
7.3.80.0080.00815.07
7.3.70.0040.01114.90
7.3.60.0060.00614.95
7.3.50.0130.00314.71
7.3.40.0040.01214.93
7.3.30.0000.01614.98
7.3.20.0100.00316.77
7.3.10.0060.00916.74
7.3.00.0080.00316.70
7.2.330.0120.00616.44
7.2.320.0080.00916.85
7.2.310.0140.00316.57
7.2.300.0030.01316.43
7.2.290.0060.01016.61
7.2.240.0030.01715.27
7.2.230.0060.01215.05
7.2.220.0030.00914.68
7.2.210.0030.01315.14
7.2.200.0040.01115.20
7.2.190.0000.00915.11
7.2.180.0100.00314.91
7.2.170.0070.01015.06
7.2.160.0030.00715.04
7.2.150.0090.00616.84
7.2.140.0040.01116.93
7.2.130.0040.00917.14
7.2.120.0040.00716.98
7.2.110.0020.01016.86
7.2.100.0050.00917.03
7.2.90.0100.00516.87
7.2.80.0080.00616.99
7.2.70.0050.00916.88
7.2.60.0080.00717.00
7.2.50.0050.00916.86
7.2.40.0080.00516.85
7.2.30.0050.01116.99
7.2.20.0070.00716.83
7.2.10.0040.00916.84
7.2.00.0020.01017.67
7.1.330.0090.00915.77
7.1.320.0060.00315.72
7.1.310.0070.00715.80
7.1.300.0160.00015.91
7.1.290.0090.00015.68
7.1.280.0070.01015.99
7.1.270.0070.00715.92
7.1.260.0070.00715.74
7.1.250.0060.00615.70
7.1.200.0070.00715.74
7.1.100.0530.01115.91
7.1.70.0000.00817.20
7.1.60.0040.02119.40
7.1.50.0100.01016.89
7.1.00.0000.04022.31
7.0.200.0030.00516.77
7.0.140.0070.07022.00
7.0.60.0070.03719.98
7.0.50.0130.07017.91
7.0.40.0030.05020.30
7.0.30.0230.05320.21
7.0.20.0300.07320.09
7.0.10.0230.04320.16
7.0.00.0130.08320.09
5.6.280.0070.06321.04
5.6.210.0030.06720.48
5.6.200.0100.05018.18
5.6.190.0000.04720.64
5.6.180.0270.07720.61
5.6.170.0270.03720.55
5.6.160.0100.06320.52
5.6.150.0030.08318.27
5.6.140.0100.08318.15
5.6.130.0030.08318.24
5.6.120.0030.06021.00
5.6.110.0070.05021.01
5.6.100.0030.04321.04
5.6.90.0100.08321.05
5.6.80.0030.07720.39
5.6.70.4200.04020.46
5.5.350.0330.06020.41
5.5.340.0070.08317.99
5.5.330.0230.06020.19
5.5.320.0470.05720.41
5.5.310.0330.07720.24
5.5.300.0030.05318.04
5.5.290.0030.08317.97
5.5.280.0170.06720.79
5.5.270.0130.05320.82
5.5.260.0070.04320.88
5.5.250.0130.07720.63
5.5.240.0100.04020.17
5.4.450.0030.06319.30
5.4.440.0070.05019.30
5.4.430.0070.07719.39
5.4.420.0100.07319.46
5.4.410.0130.06719.05
5.4.400.0000.08019.08
5.4.390.0100.08318.86
5.4.380.0070.04719.00
5.4.370.0030.04319.20
5.4.360.0070.07719.00
5.4.350.0130.07019.25
5.4.340.0070.08019.16
5.4.320.0100.08018.92
5.4.310.0030.04018.85
5.4.300.0030.08019.12
5.4.290.0100.06018.98
5.4.280.0030.07719.16
5.4.270.0000.04318.86
5.4.260.0100.07318.87
5.4.250.0030.06018.97
5.4.240.0100.03318.84
5.4.230.0030.08018.84
5.4.220.0130.06318.85
5.4.210.0070.04719.23
5.4.200.0030.06719.23
5.4.190.0030.08019.18
5.4.180.0030.07319.14
5.4.170.0000.05319.13
5.4.160.0070.07719.09
5.4.150.0070.04019.21
5.4.140.0030.04016.39
5.4.130.0070.05316.36
5.4.120.0030.04016.47
5.4.110.0070.07316.52
5.4.100.0100.06716.43
5.4.90.0030.03716.72
5.4.80.0000.07716.40
5.4.70.0100.07016.46
5.4.60.0030.05316.50
5.4.50.0030.05016.45
5.4.40.0030.07316.44
5.4.30.0070.07716.34
5.4.20.0130.06016.37
5.4.10.0100.07016.63
5.4.00.0100.07315.95
5.3.290.0070.04014.73
5.3.280.0000.08014.70
5.3.270.0070.07714.80
5.3.260.0030.06314.67
5.3.250.0070.06314.65
5.3.240.0070.04014.80
5.3.230.0100.06714.79
5.3.220.0070.07314.48
5.3.210.0130.05314.75
5.3.200.0100.06314.63
5.3.190.0070.07714.61
5.3.180.0100.08314.59
5.3.170.0100.06314.64
5.3.160.0030.04314.61
5.3.150.0070.07014.65
5.3.140.0030.07014.63
5.3.130.0030.06714.74
5.3.120.0000.04714.64
5.3.110.0070.08014.58
5.3.100.0030.06314.09
5.3.90.0070.07014.12
5.3.80.0030.04714.12
5.3.70.0030.07014.20
5.3.60.0100.05314.03
5.3.50.0000.04014.13
5.3.40.0030.03714.02
5.3.30.0070.03313.93
5.3.20.0030.06313.74
5.3.10.0100.06713.83
5.3.00.0030.07713.58
5.2.170.0070.04011.23
5.2.160.0000.03311.21
5.2.150.0030.03311.19
5.2.140.0100.03311.18
5.2.130.0030.06711.29
5.2.120.0030.05711.04
5.2.110.0000.04311.09
5.2.100.0030.06311.19
5.2.90.0100.02311.21
5.2.80.0100.06011.18
5.2.70.0030.06311.10
5.2.60.0030.04311.05
5.2.50.0030.06711.19
5.2.40.0000.04311.02
5.2.30.0070.06011.04
5.2.20.0100.03011.00
5.2.10.0030.02710.94
5.2.00.0030.02710.75
5.1.60.0070.05010.07
5.1.50.0030.04010.00
5.1.40.0070.03010.02
5.1.30.0030.05310.28
5.1.20.0170.04710.29
5.1.10.0100.05310.09
5.1.00.0030.02710.15
5.0.50.0030.0308.61
5.0.40.0070.0378.43
5.0.30.0000.0708.23
5.0.20.0070.0438.27
5.0.10.0030.0338.29
5.0.00.0000.0438.24
4.4.90.0030.0308.05
4.4.80.0030.0378.05
4.4.70.0000.0308.05
4.4.60.0030.0308.05
4.4.50.0030.0178.05
4.4.40.0030.0508.05
4.4.30.0070.0138.05
4.4.20.0030.0238.05
4.4.10.0070.0238.05
4.4.00.0070.0278.05
4.3.110.0030.0338.05
4.3.100.0030.0178.05
4.3.90.0000.0178.05
4.3.80.0000.0538.05
4.3.70.0030.0238.05
4.3.60.0000.0238.05
4.3.50.0000.0278.05
4.3.40.0000.0538.05
4.3.30.0000.0278.05
4.3.20.0030.0208.05
4.3.10.0000.0238.05
4.3.00.0030.0378.05

preferences:
43.67 ms | 401 KiB | 5 Q