3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[Attribute(Attribute::TARGET_PROPERTY)] class NotSerializable {} class Foo { #[NotSerializable] public $bar = 1; public $baz = 2; public function __serialize(): array { $data = []; foreach ((new ReflectionObject($this))->getProperties() as $property) { if ($property->getAttributes(NotSerializable::class)) { continue; } $data[$property->getName()] = $property->getValue($this); } var_dump($data); return $data; } } var_dump(unserialize(serialize(new Foo())));

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.00.0140.00919.91
8.4.150.0020.00014.05
8.4.140.0100.01117.32
8.4.130.0110.00817.98
8.4.120.0080.00820.61
8.4.110.0140.00422.47
8.4.100.0030.00517.80
8.4.90.0050.00320.67
8.4.80.0050.00320.33
8.4.70.0060.01420.55
8.4.60.0080.01220.29
8.4.50.0110.00918.53
8.4.40.0060.00317.50
8.4.30.0040.00418.71
8.4.20.0140.00717.82
8.4.10.0030.00619.43
8.3.280.0130.01018.36
8.3.270.0090.01016.50
8.3.260.0140.00616.66
8.3.250.0050.00318.94
8.3.240.0120.00617.18
8.3.230.0130.00616.41
8.3.220.0110.01019.09
8.3.210.0100.00918.29
8.3.200.0040.00516.70
8.3.190.0050.00317.06
8.3.180.0130.00618.97
8.3.170.0040.01420.75
8.3.160.0060.00316.71
8.3.150.0060.01319.06
8.3.140.0090.00920.70
8.3.130.0070.00318.59
8.3.120.0060.00618.75
8.3.110.0060.00320.94
8.3.100.0080.00024.06
8.3.90.0120.00626.77
8.3.80.0060.00318.43
8.3.70.0040.01116.63
8.3.60.0110.00416.48
8.3.50.0150.00316.64
8.3.40.0100.01023.66
8.3.30.0090.00620.11
8.3.20.0000.00724.18
8.3.10.0110.00821.81
8.3.00.0120.00718.97
8.2.290.0030.00520.56
8.2.280.0150.00418.25
8.2.270.0000.02016.48
8.2.260.0060.00316.37
8.2.250.0070.01318.31
8.2.240.0110.00717.06
8.2.230.0080.00822.58
8.2.220.0030.00637.54
8.2.210.0080.00026.77
8.2.200.0060.00318.54
8.2.190.0180.00318.26
8.2.180.0120.00316.75
8.2.170.0040.01118.79
8.2.160.0140.00022.96
8.2.150.0000.00825.66
8.2.140.0120.00720.47
8.2.130.0060.01320.48
8.2.120.0090.00919.06
8.2.110.0100.00719.27
8.2.100.0100.00919.01
8.2.90.0050.01218.89
8.2.80.0090.00618.69
8.2.70.0140.00418.81
8.2.60.0110.00419.68
8.2.50.0090.00719.63
8.2.40.0080.01018.77
8.2.30.0110.00618.83
8.2.20.0090.00318.76
8.2.10.0140.00018.86
8.2.00.0040.00818.78
8.1.330.0100.00921.95
8.1.320.0130.00717.84
8.1.310.0110.00416.82
8.1.300.0040.00418.16
8.1.290.0060.00630.84
8.1.280.0030.01025.92
8.1.270.0140.00523.00
8.1.260.0070.00722.99
8.1.250.0070.01022.93
8.1.240.0130.00618.75
8.1.230.0080.00418.65
8.1.220.0090.00318.91
8.1.210.0090.00318.53
8.1.200.0090.00318.63
8.1.190.0080.00418.74
8.1.180.0090.00318.48
8.1.170.0080.00018.53
8.1.160.0040.00718.47
8.1.150.0060.00518.57
8.1.140.0040.00418.62
8.1.130.0020.00618.73
8.1.120.0020.00618.59
8.1.110.0030.00618.53
8.1.100.0070.00218.56
8.1.90.0050.00418.56
8.1.80.0050.00318.59
8.1.70.0060.00318.57
8.1.60.0030.00518.69
8.1.50.0080.00018.60
8.1.40.0020.00618.70
8.1.30.0050.00418.71
8.1.20.0070.00218.80
8.1.10.0070.00218.52
8.1.00.0050.00418.55

preferences:
80.11 ms | 403 KiB | 5 Q