3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $b = 'foo'; } class B extends A { public function __sleep() { return array('b'); } } class C extends A implements Serializable { public function unserialize($serialized) { /*... */ } public function serialize() { $b = new ReflectionProperty('A', 'b'); $b->setAccessible(true); return serialize(array('b' => $b->getValue($this))); } } var_dump(serialize(new A())); var_dump(serialize(new B())); var_dump(serialize(new C())); var_dump(array(new C()));

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.0110.00418.89
8.3.30.0090.00918.71
8.3.20.0080.00018.77
8.3.10.0030.00620.41
8.3.00.0040.00419.25
8.2.170.0140.00022.96
8.2.160.0070.00722.18
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0060.00319.98
8.2.110.0040.00419.38
8.2.100.0070.00417.84
8.2.90.0030.00619.35
8.2.80.0000.00818.04
8.2.70.0030.00617.63
8.2.60.0050.00517.80
8.2.50.0060.00318.07
8.2.40.0040.00419.95
8.2.30.0040.00418.02
8.2.20.0040.00417.65
8.2.10.0060.00319.46
8.2.00.0040.00417.76
8.1.270.0000.00824.66
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0040.00723.64
8.1.230.0050.00521.04
8.1.220.0000.00818.59
8.1.210.0030.00618.77
8.1.200.0060.00317.48
8.1.190.0030.00617.51
8.1.180.0040.00418.10
8.1.170.0000.00918.84
8.1.160.0030.00518.93
8.1.150.0080.00018.57
8.1.140.0080.00017.52
8.1.130.0000.00717.73
8.1.120.0030.00517.39
8.1.110.0030.00517.44
8.1.100.0040.00417.52
8.1.90.0000.00717.45
8.1.80.0000.00717.44
8.1.70.0040.00417.37
8.1.60.0050.00217.59
8.1.50.0000.00717.44
8.1.40.0080.00017.39
8.1.30.0040.00417.66
8.1.20.0000.00817.60
8.1.10.0040.00417.59
8.1.00.0000.00817.54
8.0.300.0000.00719.76
8.0.290.0040.00416.75
8.0.280.0030.00318.46
8.0.270.0020.00517.32
8.0.260.0000.00716.82
8.0.250.0050.00317.00
8.0.240.0030.00617.03
8.0.230.0070.00016.98
8.0.220.0070.00016.94
8.0.210.0080.00017.01
8.0.200.0030.00316.97
8.0.190.0030.00316.94
8.0.180.0030.00516.95
8.0.170.0040.00416.95
8.0.160.0030.00516.89
8.0.150.0080.00016.89
8.0.140.0040.00416.80
8.0.130.0000.00613.45
8.0.120.0000.00716.76
8.0.110.0000.00816.93
8.0.100.0000.00816.79
8.0.90.0060.00316.94
8.0.80.0130.00717.02
8.0.70.0050.00216.92
8.0.60.0000.00817.09
8.0.50.0000.00716.99
8.0.30.0100.00917.24
8.0.20.0080.01117.11
8.0.10.0050.00316.93
8.0.00.0130.00816.78
7.4.330.0000.00512.95
7.4.320.0030.00316.54
7.4.300.0040.00216.54
7.4.290.0030.00316.45
7.4.280.0060.00316.63
7.4.270.0030.00316.51
7.4.260.0030.00313.28
7.4.250.0000.00916.61
7.4.240.0000.00716.62
7.4.230.0000.00716.62
7.4.220.0040.01116.58
7.4.210.0080.00716.58
7.4.200.0040.00416.66
7.4.190.0030.00316.72
7.4.160.0100.00716.59
7.4.150.0090.00916.52
7.4.140.0120.00916.51
7.4.130.0080.01216.53
7.4.120.0070.01116.62
7.4.110.0130.00416.44
7.4.100.0140.01216.64
7.4.90.0060.01216.43
7.4.80.0100.00816.35
7.4.70.0110.01116.32
7.4.60.0060.01216.43
7.4.50.0050.00016.64
7.4.40.0060.01016.51
7.4.30.0090.00816.48
7.4.00.0110.00414.92
7.3.330.0080.00013.40
7.3.320.0060.00013.23
7.3.310.0030.00316.29
7.3.300.0000.00816.26
7.3.290.0120.00316.37
7.3.280.0050.01316.36
7.3.270.0140.00416.40
7.3.260.0080.00916.49
7.3.250.0100.01116.32
7.3.240.0070.01016.30
7.3.230.0140.00316.38
7.3.210.0050.01116.59
7.3.200.0140.01119.39
7.3.190.0100.01016.52
7.3.180.0030.01316.50
7.3.170.0120.00816.37
7.3.160.0080.00816.41
7.3.120.0030.01014.99
7.2.330.0180.00516.52
7.2.320.0070.01016.57
7.2.310.0080.01116.50
7.2.300.0120.00416.57
7.2.290.0070.01116.71
7.2.00.0070.00719.20
7.1.100.0030.01418.04
7.1.70.0040.00416.80
7.1.60.0070.01319.40
7.1.50.0100.01316.89
7.1.00.0030.05322.51
7.0.200.0090.00016.83
7.0.140.0000.07721.92
7.0.120.0100.07021.96
7.0.60.0000.08020.02
7.0.50.0030.05017.87
7.0.40.0230.06720.15
7.0.30.0370.07020.06
7.0.20.0270.08020.23
7.0.10.0270.08320.08
7.0.00.0030.04720.07
5.6.280.0070.06721.13
5.6.210.0070.08020.67
5.6.200.0030.08718.16
5.6.190.0070.09320.57
5.6.180.0170.05020.63
5.6.170.0230.05020.56
5.6.160.0100.06720.39
5.6.150.0070.08318.23
5.6.140.0130.08318.23
5.6.130.0070.08318.18
5.6.120.0100.08321.04
5.6.110.0070.09021.02
5.6.100.0030.04721.13
5.6.90.0070.07720.97
5.6.80.0070.08720.38
5.6.70.4370.04320.28
5.5.350.0300.07320.34
5.5.340.0170.06317.93
5.5.330.0170.06320.35
5.5.320.0100.08020.34
5.5.310.0370.07020.51
5.5.300.0070.03717.98
5.5.290.0030.08318.03
5.5.280.0170.05320.88
5.5.270.0030.05720.65
5.5.260.0070.09020.77
5.5.250.0030.08720.47
5.5.240.0100.04720.27
5.4.450.0070.04719.20
5.4.440.0070.08019.48
5.4.430.0070.06719.51
5.4.420.0070.07019.47
5.4.410.0100.06019.16
5.4.400.0030.07718.99
5.4.390.0070.05318.92
5.4.380.0130.06319.12
5.4.370.0200.05318.83
5.4.360.0000.04018.92
5.4.350.0100.03318.85
5.4.340.0070.03719.24
5.4.320.0030.05319.20
5.4.310.0100.05319.14
5.4.300.0130.06019.14
5.4.290.0030.05019.14
5.4.280.0100.04318.88
5.4.270.0070.07719.11
5.4.260.0000.08019.16
5.4.250.0070.04319.14
5.4.240.0100.03319.13
5.4.230.0070.04019.07
5.4.220.0170.07019.15
5.4.210.0170.07019.14
5.4.200.0130.07019.11
5.4.190.0130.07318.97
5.4.180.0070.03719.23
5.4.170.0000.04318.85
5.4.160.0070.07719.17
5.4.150.0070.06718.83
5.4.140.0130.06716.41
5.4.130.0070.06016.45
5.4.120.0070.03316.42
5.4.110.0070.03716.35
5.4.100.0070.07316.42
5.4.90.0030.04716.33
5.4.80.0130.05316.41
5.4.70.0000.04716.33
5.4.60.0000.08016.40
5.4.50.0200.05716.42
5.4.40.0070.04016.64
5.4.30.0100.05316.27
5.4.20.0070.05316.30
5.4.10.0030.04316.36
5.4.00.0070.07715.75
5.3.290.0070.05014.65
5.3.280.0030.06714.76
5.3.270.0030.05314.63
5.3.260.0030.08714.67
5.3.250.0100.07314.67
5.3.240.0070.03714.61
5.3.230.0100.03314.66
5.3.220.0000.05014.50
5.3.210.0100.07014.46
5.3.200.0070.07314.59
5.3.190.0030.04714.62
5.3.180.0070.07314.58
5.3.170.0030.05014.61
5.3.160.0030.04714.57
5.3.150.0030.06014.71
5.3.140.0030.07014.71
5.3.130.0070.07714.55
5.3.120.0170.06014.57
5.3.110.0000.06014.72
5.3.100.0070.07014.04
5.3.90.0130.06714.06
5.3.80.0030.05714.05
5.3.70.0030.05314.04
5.3.60.0070.04314.07
5.3.50.0070.07713.98
5.3.40.0030.04014.10
5.3.30.0130.04013.81
5.3.20.0100.07013.76
5.3.10.0070.04313.72
5.3.00.0100.03313.64
5.2.170.0100.03311.16
5.2.160.0100.05711.32
5.2.150.0070.05311.20
5.2.140.0030.03311.18
5.2.130.0070.05711.06
5.2.120.0100.02711.19
5.2.110.0030.03711.18
5.2.100.0000.03311.16
5.2.90.0000.03011.11
5.2.80.0100.02711.18
5.2.70.0030.04011.11
5.2.60.0070.05311.09
5.2.50.0070.05711.17
5.2.40.0130.05311.02
5.2.30.0030.05010.98
5.2.20.0070.03310.91
5.2.10.0070.05710.92
5.2.00.0030.03310.68
5.1.60.0030.04310.00
5.1.50.0070.03710.16
5.1.40.0070.02010.13
5.1.30.0000.05310.40
5.1.20.0070.03010.51
5.1.10.0070.0509.98
5.1.00.0070.03710.05
5.0.50.0030.0508.56
5.0.40.0000.0278.56
5.0.30.0070.0378.56
5.0.20.0000.0208.56
5.0.10.0070.0408.56
5.0.00.0000.0578.56
4.4.90.0000.0178.56
4.4.80.0000.0178.56
4.4.70.0070.0308.56
4.4.60.0000.0338.56
4.4.50.0070.0278.56
4.4.40.0030.0238.56
4.4.30.0000.0378.56
4.4.20.0030.0378.56
4.4.10.0030.0308.56
4.4.00.0030.0378.56
4.3.110.0000.0308.56
4.3.100.0000.0308.56
4.3.90.0000.0338.56
4.3.80.0070.0308.56
4.3.70.0000.0178.56
4.3.60.0030.0138.56
4.3.50.0000.0238.56
4.3.40.0030.0208.56
4.3.30.0000.0178.56
4.3.20.0000.0238.56
4.3.10.0070.0308.56
4.3.00.0000.0238.56

preferences:
45.02 ms | 400 KiB | 5 Q