3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait DependencySerializationTrait { public function __sleep() { return array_keys(get_object_vars($this)); } } abstract class Base { use DependencySerializationTrait; } class Test extends Base { private $something; public function __construct() { $this->something = 'test'; } public function getSomething() { return $this->something ?? 'NULLSAD'; } } class TestV2 { private $something; public function __construct() { $this->something = 'yay!'; } public function getSomething() { return $this->something ?? 'NULLSAD'; } public function __sleep() { return array_keys(get_object_vars($this)); } } $foo = new Test(); $blob = serialize($foo); $un_foo = unserialize($blob); echo $un_foo->getSomething(); echo "\n"; $bar = new TestV2(); $blob = serialize($bar); $un_bar = unserialize($blob); echo $un_bar->getSomething();

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.5.10.0100.00716.58
8.5.00.0130.01019.86
8.4.150.0030.00014.05
8.4.140.0110.01117.62
8.4.130.0150.00617.83
8.4.120.0140.00622.20
8.4.110.0110.00422.45
8.4.100.0110.01017.65
8.4.90.0080.00718.86
8.4.80.0100.00618.75
8.4.70.0040.00417.80
8.4.60.0120.00818.66
8.4.50.0120.01018.68
8.4.40.0150.00617.62
8.4.30.0000.00820.29
8.4.20.0170.00319.64
8.4.10.0090.00619.30
8.3.280.0110.01118.52
8.3.270.0100.01016.61
8.3.260.0120.00816.51
8.3.250.0120.00818.87
8.3.240.0090.01016.54
8.3.230.0110.00716.69
8.3.220.0070.00818.98
8.3.210.0100.01016.66
8.3.200.0090.00916.55
8.3.190.0130.00717.17
8.3.180.0070.00116.85
8.3.170.0090.01020.73
8.3.160.0090.00917.31
8.3.150.0130.00717.01
8.3.140.0040.01416.49
8.3.130.0070.00016.53
8.3.120.0030.00720.97
8.3.110.0060.00318.41
8.3.100.0080.00416.54
8.3.90.0000.00818.46
8.3.80.0030.00619.36
8.3.70.0070.01116.75
8.3.60.0090.00918.30
8.3.50.0150.00523.63
8.3.40.0210.00018.92
8.3.30.0070.00718.87
8.3.20.0030.00624.18
8.3.10.0050.00324.66
8.3.00.0110.00426.16
8.2.290.0080.00820.39
8.2.280.0110.00918.21
8.2.270.0110.00716.93
8.2.260.0100.00316.50
8.2.250.0050.00318.71
8.2.240.0090.00917.44
8.2.230.0120.00320.94
8.2.220.0110.00724.06
8.2.210.0030.00526.77
8.2.200.0060.00316.50
8.2.190.0100.00718.30
8.2.180.0040.01225.92
8.2.170.0100.01018.79
8.2.160.0100.01022.96
8.2.150.0050.00325.66
8.2.140.0070.00024.66
8.2.130.0070.00726.16
8.2.120.0040.00426.35
8.2.110.0100.00020.55
8.2.100.0090.00317.91
8.2.90.0030.00517.91
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0000.00817.63
8.2.50.0050.00318.05
8.2.40.0030.00619.88
8.2.30.0030.00617.95
8.2.20.0040.00418.07
8.2.10.0080.00019.32
8.2.00.0030.00319.14
8.1.330.0100.00721.90
8.1.320.0100.00916.13
8.1.310.0040.01516.87
8.1.300.0040.00718.49
8.1.290.0090.00018.88
8.1.280.0140.00325.92
8.1.270.0090.00023.99
8.1.260.0080.00028.09
8.1.250.0120.00628.09
8.1.240.0110.00023.81
8.1.230.0080.00320.88
8.1.220.0060.00317.79
8.1.210.0050.00319.89
8.1.200.0070.00317.63
8.1.190.0080.00017.12
8.1.180.0060.00318.10
8.1.170.0000.00718.70
8.1.160.0040.00418.86
8.1.150.0030.00618.93
8.1.140.0070.00018.98
8.1.130.0000.00720.04
8.1.120.0030.00717.45
8.1.110.0030.00617.45
8.1.100.0040.00417.46
8.1.90.0100.00017.45
8.1.80.0000.00917.54
8.1.70.0030.00717.36
8.1.60.0040.00417.57
8.1.50.0000.00817.56
8.1.40.0090.00017.48
8.1.30.0000.00817.64
8.1.20.0060.00317.70
8.1.10.0030.00617.60
8.1.00.0050.00317.52
8.0.300.0000.00720.13
8.0.290.0080.00016.88
8.0.280.0040.00418.39
8.0.270.0070.00018.10
8.0.260.0070.00018.50
8.0.250.0000.00717.07
8.0.240.0000.00817.07
8.0.230.0040.00417.01
8.0.220.0040.00416.88
8.0.210.0000.00616.99
8.0.200.0000.00817.06
8.0.190.0050.00217.04
8.0.180.0040.00416.86
8.0.170.0030.00617.04
8.0.160.0000.00817.04
8.0.150.0040.00416.94
8.0.140.0070.00016.90
8.0.130.0000.00513.43
8.0.120.0000.00716.89
8.0.110.0000.00716.87
8.0.100.0000.00716.87
8.0.90.0030.00617.00
8.0.80.0050.01116.93
8.0.70.0040.00416.85
8.0.60.0000.00717.00
8.0.50.0020.00517.05
8.0.30.0100.00717.32
8.0.20.0130.00717.05
8.0.10.0070.00017.05
8.0.00.0090.00917.03
7.4.330.0000.00515.55
7.4.320.0030.00316.66
7.4.300.0080.00016.64
7.4.290.0000.00716.55
7.4.280.0040.00416.63
7.4.270.0030.00316.52
7.4.260.0020.00213.35
7.4.250.0040.00416.58
7.4.240.0040.00416.54
7.4.230.0030.00516.37
7.4.220.0050.00216.57
7.4.210.0060.00816.65
7.4.200.0040.00416.62
7.4.130.0070.01416.62
7.4.120.0030.01716.59
7.4.110.0060.01216.58
7.4.100.0100.01316.58
7.4.90.0140.00816.54
7.4.80.0120.00919.39
7.4.70.0070.01016.50
7.4.60.0080.00816.41
7.4.50.0050.01116.49
7.4.40.0120.00516.38
7.4.30.0100.00616.42
7.4.20.0110.00716.58
7.4.10.0120.00816.53
7.4.00.0070.00916.60
7.3.330.0020.00516.23
7.3.320.0030.00313.15
7.3.310.0020.00516.30
7.3.300.0000.00716.40
7.3.290.0060.01116.32
7.3.280.0060.01616.31
7.3.260.0030.02016.51
7.3.240.0100.00816.42
7.3.230.0150.00416.41
7.3.210.0120.00916.63
7.3.200.0060.00916.43
7.3.190.0070.01616.50
7.3.180.0090.00816.49
7.3.170.0050.01116.33
7.3.160.0050.01316.31
7.3.150.0090.00916.32
7.3.140.0110.00516.56
7.3.130.0090.00616.40
7.3.120.0050.01116.38
7.3.110.0110.00816.58
7.3.100.0060.00916.44
7.3.90.0100.00616.45
7.3.80.0070.01016.60
7.3.70.0090.00716.37
7.3.60.0140.00316.34
7.3.50.0080.00916.47
7.3.40.0100.00716.38
7.3.30.0040.01216.37
7.3.20.0050.01216.36
7.3.10.0080.01116.38
7.3.00.0070.01416.42
7.2.330.0000.01716.81
7.2.320.0080.00816.78
7.2.310.0070.00916.68
7.2.300.0060.01216.37
7.2.290.0090.00916.31
7.2.280.0150.00516.62
7.2.270.0110.00916.54
7.2.260.0080.00916.68
7.2.250.0070.01016.82
7.2.240.0110.00616.64
7.2.230.0080.00816.61
7.2.220.0070.01016.60
7.2.210.0070.01016.64
7.2.200.0110.00716.69
7.2.190.0100.00716.66
7.2.180.0090.00816.61
7.2.170.0150.00116.71
7.2.160.0090.00916.65
7.2.150.0110.00816.76
7.2.140.0120.00516.81
7.2.130.0250.01216.69
7.2.120.0050.01216.69
7.2.110.0110.00816.70
7.2.100.0050.01216.57
7.2.90.0120.00716.48
7.2.80.0060.01116.68
7.2.70.0120.00616.61
7.2.60.0110.00616.64
7.2.50.0050.01316.75
7.2.40.0070.01016.83
7.2.30.0080.01016.71
7.2.20.0090.00816.49
7.2.10.0080.00816.68
7.2.00.0070.01216.61

preferences:
42.38 ms | 403 KiB | 5 Q