3v4l.org

run code in 300+ PHP versions simultaneously
<?php $drupal_version = 10.0; if (version_compare($drupal_version, '8.0')) { interface I { // In Symfony 5.4 this is: // public static function test($s, $i, $m); // In Symfony 6.0 this is: public static function test(string $s, int $i, mixed $m): mixed; } } else { interface I { // In Symfony 5.4 this is: // public static function test($s, $i, $m); // In Symfony 6.0 this is: public static function test($s, $i, $m); } } if (version_compare($drupal_version, '8.0')) { class A implements I { public static function test(string $s, int $i, mixed $m): mixed { return 'hello'; } } } else { class A implements I { public static function test($s, $i, $m) { return 'hello'; } } } A::test('string', 1, '');

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.0130.00819.36
8.4.110.0040.00424.19
8.4.100.0150.00617.81
8.4.90.0080.00620.52
8.4.80.0040.00518.96
8.4.70.0110.01018.67
8.4.60.0140.00720.49
8.4.50.0110.01118.33
8.4.40.0080.01119.53
8.4.30.0030.00620.64
8.4.20.0030.00717.78
8.4.10.0040.00417.79
8.3.250.0100.00818.75
8.3.240.0100.00816.57
8.3.230.0060.00216.50
8.3.220.0070.01119.03
8.3.210.0070.00816.54
8.3.200.0050.00416.44
8.3.190.0080.00816.95
8.3.180.0100.01018.81
8.3.170.0060.01217.30
8.3.160.0100.00719.17
8.3.150.0110.00716.41
8.3.140.0080.00016.53
8.3.130.0040.00416.70
8.3.120.0170.00318.61
8.3.110.0080.00020.94
8.3.100.0060.00924.06
8.3.90.0070.01026.77
8.3.80.0060.00316.50
8.3.70.0060.01316.63
8.3.60.0060.00916.50
8.3.50.0070.01119.77
8.3.40.0130.01018.92
8.3.30.0170.00019.05
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0000.00826.16
8.2.290.0050.00316.71
8.2.280.0120.00718.30
8.2.270.0130.00618.71
8.2.260.0040.00417.07
8.2.250.0070.00718.52
8.2.240.0130.00717.01
8.2.230.0000.00922.58
8.2.220.0060.00337.54
8.2.210.0110.00426.77
8.2.200.0090.00016.63
8.2.190.0070.01416.58
8.2.180.0180.00325.92
8.2.170.0140.00018.95
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0000.00726.16
8.2.110.0070.00320.99
8.2.100.0120.00017.78
8.2.90.0040.00417.84
8.2.80.0030.00517.97
8.2.70.0060.00317.50
8.2.60.0100.00017.80
8.2.50.0030.00618.07
8.2.40.0040.00418.22
8.2.30.0000.00817.98
8.2.20.0030.00520.50
8.2.10.0030.00517.60
8.2.00.0040.00419.24
8.1.330.0140.00516.14
8.1.320.0120.00717.73
8.1.310.0040.00416.28
8.1.300.0060.00316.31
8.1.290.0040.00418.88
8.1.280.0110.00725.92
8.1.270.0040.00424.01
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.00922.42
8.1.230.0120.00020.95
8.1.220.0050.00317.74
8.1.210.0040.00418.88
8.1.200.0000.01017.13
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0030.00618.65
8.1.160.0060.00318.76
8.1.150.0050.00218.68
8.1.140.0060.00317.44
8.1.130.0000.01018.89
8.1.120.0000.00717.48
8.1.110.0080.00017.38
8.1.100.0050.00217.34
8.1.90.0020.00517.42
8.1.80.0000.00817.46
8.1.70.0030.00317.36
8.1.60.0040.00417.51
8.1.50.0000.00817.54
8.1.40.0080.00017.51
8.1.30.0030.00917.63
8.1.20.0140.00617.59
8.1.10.0160.00817.41
8.1.00.0130.00617.35
8.0.300.0000.00820.04
8.0.290.0000.00816.75
8.0.280.0060.00320.23
8.0.270.0000.00817.93
8.0.260.0000.00618.41
8.0.250.0070.00316.96
8.0.240.0000.01016.95
8.0.230.0000.00716.82
8.0.220.0030.00316.79
8.0.210.0040.00416.88
8.0.200.0080.00017.02
8.0.190.0050.00516.99
8.0.180.0040.00416.83
8.0.170.0000.00816.92
8.0.160.0100.00716.80
8.0.150.0150.00516.76
8.0.140.0160.00516.77
8.0.130.0140.00616.72
8.0.120.0150.00616.82
8.0.110.0140.00716.85
8.0.100.0150.00516.85
8.0.90.0160.00416.90
8.0.80.0140.00616.86
8.0.70.0160.00316.83
8.0.60.0140.00616.87
8.0.50.0170.00416.83
8.0.30.0130.00616.80
8.0.20.0110.00716.84
8.0.10.0150.00516.98
7.4.330.0050.00015.55
7.4.320.0000.00616.51
7.4.300.0030.00316.41
7.4.290.0040.00416.46
7.4.280.0120.00516.50
7.4.270.0160.00716.51
7.4.260.0180.00416.56
7.4.250.0160.00616.47
7.4.240.0110.00916.56
7.4.230.0170.00616.57
7.4.220.0180.00316.50
7.4.210.0110.00616.56
7.4.200.0140.00616.48
7.4.190.0180.00316.59
7.4.180.0140.00516.61
7.4.160.0150.00516.44
7.4.150.0110.00716.46
7.4.140.0130.00516.34
7.4.130.0160.00316.42
7.4.120.0110.00616.45
7.4.110.0130.00616.40
7.4.100.0090.00816.44
7.4.90.0130.00416.40
7.4.80.0140.00516.43
7.4.70.0120.00616.48
7.4.60.0100.00816.42
7.4.50.0170.00316.25
7.4.40.0150.00516.33
7.4.30.0130.00416.39
7.4.20.0060.00916.37
7.4.10.0060.00616.50
7.4.00.0030.00716.50

preferences:
32.14 ms | 403 KiB | 5 Q