3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public string $username; public function __construct(string $name) { $this->username = $name; } } interface Factory { public static function make(string $name): object; } class UserFactory implements Factory { public static function make(string $name): User { return new User($name); } } $uf = UserFactory::make("Tiffany"); echo $uf->username;

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.60.0070.00718.31
8.3.50.0030.01716.46
8.3.40.0160.01018.96
8.3.30.0100.01018.67
8.3.20.0080.00021.76
8.3.10.0040.00420.34
8.3.00.0080.00023.70
8.2.180.0140.00718.34
8.2.170.0110.01122.96
8.2.160.0140.00020.46
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00426.16
8.2.110.0070.00321.02
8.2.100.0080.00317.91
8.2.90.0000.00817.63
8.2.80.0000.00818.78
8.2.70.0030.00617.63
8.2.60.0060.00317.93
8.2.50.0080.00017.98
8.2.40.0000.00718.34
8.2.30.0040.00418.34
8.2.20.0000.00818.09
8.2.10.0090.00019.23
8.2.00.0050.00319.14
8.1.280.0100.01025.92
8.1.270.0040.00420.75
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.45
8.1.230.0090.00320.95
8.1.220.0030.00517.79
8.1.210.0030.00718.77
8.1.200.0000.00917.36
8.1.190.0040.00417.35
8.1.180.0050.00518.10
8.1.170.0040.00417.62
8.1.160.0000.00820.66
8.1.150.0000.00718.88
8.1.140.0050.00322.05
8.1.130.0000.00720.05
8.1.120.0070.00017.32
8.1.110.0000.00717.36
8.1.100.0000.00817.30
8.1.90.0000.00717.39
8.1.80.0040.00417.50
8.1.70.0000.00817.37
8.1.60.0000.00917.55
8.1.50.0000.00817.48
8.1.40.0030.00617.54
8.1.30.0040.00417.59
8.1.20.0000.00817.56
8.1.10.0050.00217.61
8.1.00.0000.00817.40
8.0.300.0000.00719.93
8.0.290.0070.00016.63
8.0.280.0070.00018.49
8.0.270.0050.00317.93
8.0.260.0030.00320.07
8.0.250.0080.00016.92
8.0.240.0070.00317.00
8.0.230.0000.00816.92
8.0.220.0030.00316.78
8.0.210.0000.00716.86
8.0.200.0040.00416.94
8.0.190.0030.00517.00
8.0.180.0040.00416.89
8.0.170.0040.00416.89
8.0.160.0000.00716.85
8.0.150.0000.00716.75
8.0.140.0000.00716.74
8.0.130.0000.00513.29
8.0.120.0070.00016.79
8.0.110.0040.00416.95
8.0.100.0040.00416.93
8.0.90.0030.00616.85
8.0.80.0120.00616.83
8.0.70.0040.00416.86
8.0.60.0050.00216.71
8.0.50.0040.00416.74
8.0.30.0100.00717.08
8.0.20.0100.01016.84
8.0.10.0000.00717.03
8.0.00.0060.01616.75
7.4.330.0000.00515.55
7.4.320.0000.00616.43
7.4.300.0060.00016.45
7.4.290.0080.00016.42
7.4.280.0030.00616.39
7.4.270.0040.00316.46
7.4.260.0050.00013.26
7.4.250.0000.00716.58
7.4.240.0060.00216.65
7.4.230.0070.00016.70
7.4.220.0020.00516.60
7.4.210.0090.00716.62
7.4.200.0000.00716.53
7.4.140.0130.00317.86
7.4.130.0040.01816.54
7.4.120.0140.00616.50
7.4.110.0110.01116.39
7.4.100.0100.01416.56
7.4.90.0090.00916.51
7.4.80.0040.01719.39
7.4.70.0130.01016.40
7.4.60.0090.00916.48
7.4.50.0070.01116.32
7.4.40.0000.01516.43
7.4.00.0030.01415.05
7.3.330.0000.00816.17
7.3.320.0020.00213.10
7.3.310.0070.00016.25
7.3.300.0070.00016.15
7.3.290.0070.00916.17
7.3.280.0030.01216.18
7.3.260.0150.00616.11
7.3.240.0080.01016.33
7.3.230.0070.01016.35
7.3.210.0090.00616.36
7.3.200.0060.01316.22
7.3.190.0080.00916.37
7.3.180.0090.00916.40
7.3.170.0060.01116.18
7.3.160.0120.00616.41
7.3.120.0070.00614.62
7.3.110.0000.01514.57
7.3.100.0030.01314.54
7.3.90.0100.00314.41
7.3.80.0030.01014.82
7.3.70.0110.00314.67
7.3.60.0100.00314.46
7.3.50.0070.00714.45
7.3.40.0100.00314.67
7.3.30.0060.00614.64
7.3.20.0130.00014.79
7.3.10.0080.00414.53
7.3.00.0070.00714.62
7.2.330.0060.01216.21
7.2.320.0070.01016.56
7.2.310.0030.01316.30
7.2.300.0030.01316.54
7.2.290.0140.00316.51
7.2.250.0060.00914.86
7.2.240.0150.00014.66
7.2.230.0090.00614.87
7.2.220.0070.00714.45
7.2.210.0060.00914.61
7.2.200.0000.01314.78
7.2.190.0150.00014.79
7.2.180.0070.00714.65
7.2.170.0070.00714.72
7.1.330.0060.01113.71
7.1.320.0060.01313.96
7.1.310.0060.00813.76
7.1.300.0030.01013.41
7.1.290.0080.00613.74
7.1.280.0030.01013.65
7.1.270.0080.00413.71
7.1.260.0030.00913.55

preferences:
57.6 ms | 400 KiB | 5 Q