3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { // construct and destruct can't have return type public function __construct() {} public function __destruct() {} // below can have return type public function __invoke(): string { return ''; } public function __unset($a): void {} public function __wakeup(): void {} public function __clone(): void {} public function __toString(): string { return ''; } public function __isset($a): bool { return true; } public function __sleep(): array { return ''; } public static function __set_state($a): object { return ''; } }

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.4.120.0070.00523.73
8.4.110.0090.00418.91
8.4.100.0150.00617.61
8.4.90.0100.00717.51
8.4.80.0120.00819.27
8.4.70.0120.01119.41
8.4.60.0400.00817.66
8.4.50.0370.01017.47
8.4.40.0230.00417.67
8.4.30.0330.00917.20
8.4.20.0410.00917.29
8.4.10.0400.01117.37
8.3.250.0080.01118.79
8.3.240.0120.00716.52
8.3.230.0150.00816.71
8.3.220.0100.00916.48
8.3.210.0030.00416.53
8.3.200.0350.00916.36
8.3.190.0350.00916.41
8.3.180.0370.00816.51
8.3.170.0420.00716.26
8.3.160.0390.00916.47
8.3.150.0430.00816.34
8.3.140.0310.00916.20
8.3.130.0190.00516.47
8.3.120.0160.00316.68
8.3.110.0200.00616.31
8.3.100.0310.00816.47
8.3.90.0350.00716.63
8.3.80.0380.00716.33
8.3.70.0380.00916.37
8.3.60.0370.00816.68
8.3.50.0370.01116.40
8.3.40.0370.00917.23
8.3.30.0300.00617.38
8.3.20.0290.00717.46
8.3.10.0240.00517.50
8.3.00.0130.00217.18
8.2.290.0130.00718.89
8.2.280.0290.00816.59
8.2.270.0290.01016.71
8.2.260.0280.01116.28
8.2.250.0290.01116.62
8.2.240.0300.01016.21
8.2.230.0300.01016.55
8.2.220.0330.00716.20
8.2.210.0280.00816.20
8.2.200.0280.01216.38
8.2.190.0270.01416.50
8.2.180.0330.00516.53
8.2.170.0350.01317.27
8.2.160.0350.00617.58
8.2.150.0340.00917.35
8.2.140.0290.01117.56
8.2.130.0350.01117.18
8.2.120.0310.01017.33
8.2.110.0340.01217.55
8.2.100.0320.01017.48
8.2.90.0370.00417.71
8.2.80.0310.00717.35
8.2.70.0270.00817.48
8.2.60.0310.00817.56
8.2.50.0340.00717.50
8.2.40.0280.00717.47
8.2.30.0200.00417.52
8.2.20.0290.01017.58
8.2.10.0370.00417.09
8.2.00.0380.00917.37

preferences:
27.33 ms | 403 KiB | 5 Q