3v4l.org

run code in 300+ PHP versions simultaneously
<?php # Typed Properties 2.0 # OLD WAY (PHP < 7.4 ) class User { public $id; public $name; public function __construct(int $id, string $name) { $this->id = $id; $this->name = $name; } } $user = new User(10, []); // This Will throw a Fatal error. # Typed Properties with PHP 7.4 All types are supported, with the exception of void and callable. class NewUser { public int $id; public string $name; } $newUser = new NewUser; $newUser->id = 10; $newUser->name = []; // This Will throw a Fatal error too !!

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.130.0070.01318.14
8.4.120.0070.00420.65
8.4.110.0110.00919.07
8.4.100.0110.01017.68
8.4.90.0110.00917.88
8.4.80.0090.01117.95
8.4.70.0030.00619.58
8.4.60.0090.00919.04
8.4.50.0100.00918.62
8.4.40.0040.00417.68
8.4.30.0180.00418.70
8.4.20.0070.01419.62
8.4.10.0030.00519.55
8.3.260.0120.00816.63
8.3.250.0030.00418.71
8.3.240.0140.00616.42
8.3.230.0110.00916.72
8.3.220.0080.01117.29
8.3.210.0110.01016.60
8.3.200.0060.00216.85
8.3.190.0110.00616.95
8.3.180.0160.00418.96
8.3.170.0140.00316.57
8.3.160.0070.01117.32
8.3.150.0060.01217.23
8.3.140.0050.00220.71
8.3.130.0070.01318.23
8.3.120.0000.00819.14
8.3.110.0060.00320.94
8.3.100.0060.00324.06
8.3.90.0000.00826.77
8.3.80.0090.00016.38
8.3.70.0090.00616.75
8.3.60.0090.01216.63
8.3.50.0150.00223.59
8.3.40.0090.00619.28
8.3.30.0110.00418.84
8.3.20.0080.00020.91
8.3.10.0060.00320.12
8.3.00.0070.01120.46
8.2.290.0050.00420.58
8.2.280.0090.01018.26
8.2.270.0040.01416.80
8.2.260.0040.00416.93
8.2.250.0040.00416.57
8.2.240.0030.00618.83
8.2.230.0040.00422.58
8.2.220.0000.01137.54
8.2.210.0120.00626.77
8.2.200.0030.00616.63
8.2.190.0100.01016.75
8.2.180.0070.01416.63
8.2.170.0070.00722.96
8.2.160.0060.00919.18
8.2.150.0060.00324.18
8.2.140.0030.00524.66
8.2.130.0050.00226.16
8.2.120.0050.00226.16
8.2.110.0040.00422.24
8.2.100.0060.00617.78
8.2.90.0040.00417.84
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0030.00617.49
8.2.50.0050.00318.05
8.2.40.0040.00418.09
8.2.30.0050.00319.39
8.2.20.0000.00817.94
8.2.10.0050.00219.29
8.2.00.0070.00019.06
8.1.330.0100.01021.91
8.1.320.0110.00717.99
8.1.310.0000.01416.11
8.1.300.0040.00418.53
8.1.290.0050.00530.84
8.1.280.0040.01125.92
8.1.270.0040.00422.09
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0080.00022.01
8.1.230.0080.00420.93
8.1.220.0040.00417.74
8.1.210.0080.00018.96
8.1.200.0060.00317.25
8.1.190.0000.00917.13
8.1.180.0110.00018.10
8.1.170.0040.00417.62
8.1.160.0040.00418.78
8.1.150.0000.00818.77
8.1.140.0040.00418.82
8.1.130.0040.00421.90
8.1.120.0040.00417.39
8.1.110.0040.00417.32
8.1.100.0030.00717.23
8.1.90.0040.00417.32
8.1.80.0000.00717.33
8.1.70.0030.00317.23
8.1.60.0000.00817.51
8.1.50.0030.00517.40
8.1.40.0000.00817.36
8.1.30.0040.00417.49
8.1.20.0050.00317.43
8.1.10.0000.00817.36
8.1.00.0030.00717.45
8.0.300.0000.00819.95
8.0.290.0040.00416.93
8.0.280.0040.00418.32
8.0.270.0070.00018.01
8.0.260.0000.00620.01
8.0.250.0030.00316.95
8.0.240.0030.00316.94
8.0.230.0000.00716.83
8.0.220.0080.00016.79
8.0.210.0000.00716.89
8.0.200.0070.00017.02
8.0.190.0070.00016.88
8.0.180.0000.00716.96
8.0.170.0000.00916.81
8.0.160.0000.00716.87
8.0.150.0040.00416.88
8.0.140.0000.00716.82
8.0.130.0030.00313.25
8.0.120.0060.00316.78
8.0.110.0050.00316.93
8.0.100.0000.00716.93
8.0.90.0040.00416.79
8.0.80.0100.00716.82
8.0.70.0000.00716.76
8.0.60.0000.00716.91
8.0.50.0040.00416.71
8.0.30.0070.01016.82
8.0.20.0060.01116.90
8.0.10.0000.00816.94
8.0.00.0060.01216.71
7.4.330.0000.00515.55
7.4.320.0000.00716.48
7.4.300.0030.00316.54
7.4.290.0070.00016.55
7.4.280.0070.00616.36
7.4.270.0030.00316.36
7.4.260.0000.00513.24
7.4.250.0070.00016.50
7.4.240.0040.00316.44
7.4.230.0040.00416.48
7.4.220.0020.00516.46
7.4.210.0080.00716.41
7.4.200.0030.00316.62
7.4.130.0060.01516.36
7.4.120.0180.00616.54
7.4.110.0170.00016.23
7.4.100.0070.01016.55
7.4.90.0100.00716.56
7.4.80.0120.00517.84
7.4.70.0140.00616.46
7.4.60.0080.01116.51
7.4.50.0040.01216.51
7.4.40.0060.01116.37
7.4.30.0120.00716.38
7.4.20.0090.01016.47
7.4.10.0090.00716.28
7.4.00.0060.01016.44
7.3.330.0000.00716.01
7.3.320.0050.00013.24
7.3.310.0000.00816.14
7.3.300.0040.00416.15
7.3.290.0090.00716.18
7.3.280.0100.00316.14
7.3.260.0110.00716.26
7.3.240.0120.00516.29
7.3.230.0030.01416.09
7.3.210.0080.00816.29
7.3.200.0080.01316.24
7.3.190.0130.00516.35
7.3.180.0080.01016.32
7.3.170.0080.01116.11
7.3.160.0130.00816.14
7.3.150.0100.01016.16
7.3.140.0090.01116.12
7.3.130.0100.00716.02
7.3.120.0090.00716.04
7.3.110.0040.01216.29
7.3.100.0110.00816.17
7.3.90.0050.01316.24
7.3.80.0110.00516.16
7.3.70.0070.01216.13
7.3.60.0140.00516.22
7.3.50.0070.00916.23
7.3.40.0120.00616.13
7.3.30.0120.00516.15
7.3.20.0110.00616.19
7.3.10.0120.00616.23
7.3.00.0080.01016.24
7.2.330.0060.01116.33
7.2.320.0110.00816.51
7.2.310.0120.00916.43
7.2.300.0120.00916.39
7.2.290.0110.00916.17
7.2.280.0080.01216.43
7.2.270.0100.00916.46
7.2.260.0120.00616.37
7.2.250.0120.00416.09
7.2.240.0110.00716.24
7.2.230.0120.00416.13
7.2.220.0060.01116.39
7.2.210.0110.01116.48
7.2.200.0090.01016.18
7.2.190.0100.00916.28
7.2.180.0120.00616.41
7.2.170.0090.01116.32
7.2.160.0090.00716.30
7.2.150.0090.00816.33
7.2.140.0140.00716.36
7.2.130.0150.00516.39
7.2.120.0110.01316.28
7.2.110.0150.00916.38
7.2.100.0080.01116.35
7.2.90.0080.01316.51
7.2.80.0080.01016.33
7.2.70.0230.00616.31
7.2.60.0100.01216.29
7.2.50.0060.01416.37
7.2.40.0110.00916.26
7.2.30.0130.00716.28
7.2.20.0130.00816.27
7.2.10.0130.01116.20
7.2.00.0110.00816.20

preferences:
93.86 ms | 403 KiB | 5 Q