3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Model { public function tableName(): string; } abstract class AbstractTable implements Model { public function tableName(): string { return constant('static::TABLE_NAME'); } } final class SomeTable extends AbstractTable { public const TABLE_NAME = 'some_table'; } $table = new SomeTable(); var_dump($table->tableName()); // $pdo->prepare(sprintf("SELECT * FROM %s", $table->tableName());

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.40.0070.01118.87
8.3.30.0090.00618.51
8.3.20.0150.00320.22
8.3.10.0060.00821.77
8.3.00.0050.00221.90
8.2.170.0140.00719.04
8.2.160.0070.00722.96
8.2.150.0040.00424.18
8.2.140.0190.00024.66
8.2.130.0080.00026.16
8.2.120.0030.00519.95
8.2.110.0070.00321.99
8.2.100.0080.00417.57
8.2.90.0000.00817.63
8.2.80.0040.00418.97
8.2.70.0090.00017.93
8.2.60.0040.00418.09
8.2.50.0080.00318.10
8.2.40.0040.00419.30
8.2.30.0060.00319.23
8.2.20.0040.00417.97
8.2.10.0000.00717.93
8.2.00.0050.00217.92
8.1.270.0080.00020.36
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.89
8.1.230.0100.00017.83
8.1.220.0040.00417.79
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0000.00817.23
8.1.180.0000.00718.10
8.1.170.0000.00818.53
8.1.160.0030.00518.84
8.1.150.0000.00720.09
8.1.140.0040.00417.77
8.1.130.0000.00717.44
8.1.120.0000.00717.46
8.1.110.0000.00817.46
8.1.100.0050.00317.33
8.1.90.0030.00517.45
8.1.80.0040.00417.46
8.1.70.0020.00517.48
8.1.60.0040.00417.61
8.1.50.0040.00417.55
8.1.40.0040.00417.55
8.1.30.0040.00417.63
8.1.20.0000.00817.53
8.1.10.0000.00817.38
8.1.00.0040.00417.43
8.0.300.0030.00618.84
8.0.290.0000.00716.75
8.0.280.0000.00818.38
8.0.270.0000.00717.13
8.0.260.0030.00316.73
8.0.250.0000.00716.84
8.0.240.0070.00016.93
8.0.230.0080.00016.92
8.0.220.0030.00316.95
8.0.210.0030.00316.91
8.0.200.0030.00516.86
8.0.190.0050.00216.85
8.0.180.0070.00016.82
8.0.170.0000.00816.90
8.0.160.0040.00416.93
8.0.150.0050.00216.76
8.0.140.0000.00916.86
8.0.130.0030.00313.33
8.0.120.0040.00416.89
8.0.110.0040.00416.89
8.0.100.0070.00016.89
8.0.90.0000.00716.88
8.0.80.0180.00316.83
8.0.70.0050.00216.76
8.0.60.0000.00716.84
8.0.50.0030.00616.71
8.0.30.0110.00816.92
8.0.20.0120.00817.40
8.0.10.0040.00417.05
8.0.00.0060.01216.88
7.4.330.0040.00015.55
7.4.320.0030.00316.64
7.4.300.0030.00316.45
7.4.290.0020.00516.48
7.4.280.0060.00316.48
7.4.270.0000.00616.61
7.4.260.0030.00316.57
7.4.250.0070.00016.48
7.4.240.0030.00316.59
7.4.230.0040.00416.68
7.4.220.0030.01316.40
7.4.210.0060.01116.57
7.4.200.0000.00716.48
7.4.160.0050.01016.38
7.4.150.0070.01117.40
7.4.140.0120.00917.86
7.4.130.0060.01216.57
7.4.120.0130.00816.45
7.4.110.0100.01016.47
7.4.100.0100.00716.36
7.4.90.0100.00716.49
7.4.80.0070.01019.39
7.4.70.0090.00916.52
7.4.60.0100.00616.42
7.4.50.0070.00216.67
7.4.40.0070.01016.44
7.4.30.0000.01716.71
7.4.00.0000.01514.80
7.3.330.0020.00213.11
7.3.320.0060.00013.36
7.3.310.0040.00416.16
7.3.300.0000.00716.18
7.3.290.0060.00916.23
7.3.280.0090.00716.27
7.3.270.0120.00817.40
7.3.260.0120.00516.25
7.3.250.0070.01016.47
7.3.240.0090.00816.42
7.3.230.0030.01316.52
7.3.210.0110.00516.45
7.3.200.0140.00316.28
7.3.190.0170.00316.55
7.3.180.0150.00316.57
7.3.170.0100.00716.44
7.3.160.0030.01216.42
7.2.330.0130.00316.36
7.2.320.0030.01316.66
7.2.310.0070.01016.54
7.2.300.0130.00816.34
7.2.290.0080.00816.38
7.2.60.0160.00616.64
7.1.200.0120.00815.44
7.1.100.0080.00817.92
7.1.90.0000.02018.17
7.1.80.0070.01017.83
7.1.70.0060.00917.00
7.1.60.0170.01734.91
7.1.50.0160.01334.55
7.1.40.0200.00734.21
7.1.30.0180.00934.41
7.1.20.0190.00634.47
7.1.10.0070.01016.41
7.1.00.0000.01616.47
7.0.240.0070.01017.57
7.0.230.0080.00817.58
7.0.220.0130.00417.55
7.0.210.0090.00616.45
7.0.200.0060.00916.52
7.0.190.0090.00316.36
7.0.180.0000.01316.00
7.0.170.0080.00415.96
7.0.160.0030.01116.20
7.0.150.0060.00915.98
7.0.140.0080.00616.15
7.0.130.0080.00816.23
7.0.120.0030.01216.38
7.0.110.0100.00716.01
7.0.100.0000.01716.28
7.0.90.0100.00916.32
7.0.80.0030.01616.05
7.0.70.0030.01615.88
7.0.60.0100.00715.93
7.0.50.0030.01616.12
7.0.40.0090.00616.34
7.0.30.0030.01616.25
7.0.20.0090.00616.20
7.0.10.0070.00716.30
7.0.00.0030.00916.29

preferences:
59.09 ms | 400 KiB | 5 Q