3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); namespace TF\Core\Model; trait tObjectID { /** * @TF: {column => id, type => int} */ protected $id; public function getId(): int { return $this->id; } public function setId(int $id): void { $this->id = $id; } } abstract class Object { } class Gallery extends Object { use tObjectID; } $x = new Gallery(); $x->setId(10); $x->setId('10');

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.0170.00016.38
8.3.50.0130.00521.87
8.3.40.0110.00718.48
8.3.30.0070.00718.48
8.3.20.0050.00220.20
8.3.10.0080.00023.48
8.3.00.0040.00419.43
8.2.180.0100.00316.38
8.2.170.0140.00722.96
8.2.160.0090.01220.22
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00819.30
8.2.120.0040.00426.35
8.2.110.0060.00322.28
8.2.100.0120.00017.80
8.2.90.0040.00418.92
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0000.00917.80
8.2.50.0060.00318.07
8.2.40.0040.00422.23
8.2.30.0050.00220.68
8.2.20.0000.00717.46
8.2.10.0040.00417.94
8.2.00.0000.00717.99
8.1.280.0110.00325.92
8.1.270.0140.00020.33
8.1.260.0070.00028.09
8.1.250.0060.01228.09
8.1.240.0000.01023.97
8.1.230.0100.00319.05
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0090.00017.23
8.1.190.0030.00517.10
8.1.180.0050.00318.10
8.1.170.0050.00318.59
8.1.160.0000.00720.65
8.1.150.0000.00718.76
8.1.140.0040.00419.39
8.1.130.0030.00317.58
8.1.120.0000.00717.36
8.1.110.0080.00017.38
8.1.100.0000.00817.22
8.1.90.0000.00817.23
8.1.80.0000.00717.31
8.1.70.0000.00717.22
8.1.60.0040.00417.38
8.1.50.0040.00417.32
8.1.40.0080.00017.30
8.1.30.0050.00317.52
8.1.20.0060.00317.46
8.1.10.0000.00817.44
8.1.00.0040.00417.29
8.0.300.0000.00718.77
8.0.290.0020.00516.63
8.0.280.0070.00018.24
8.0.270.0070.00017.09
8.0.260.0000.00617.14
8.0.250.0030.00316.91
8.0.240.0040.00416.80
8.0.230.0060.00016.81
8.0.220.0000.00716.70
8.0.210.0020.00516.80
8.0.200.0070.00016.88
8.0.190.0070.00216.90
8.0.180.0070.00016.76
8.0.170.0080.00016.91
8.0.160.0030.00516.94
8.0.150.0040.00416.75
8.0.140.0040.00716.69
8.0.130.0000.00613.18
8.0.120.0060.00316.75
8.0.110.0040.00416.72
8.0.100.0040.00416.74
8.0.90.0040.00416.70
8.0.80.0090.00916.79
8.0.70.0070.00016.79
8.0.60.0050.00316.71
8.0.50.0000.00716.86
8.0.30.0090.00916.92
8.0.20.0130.00717.40
8.0.10.0000.00716.91
8.0.00.0100.00816.69
7.4.330.0000.00516.83
7.4.320.0030.00316.47
7.4.300.0000.00716.52
7.4.290.0030.00316.45
7.4.280.0030.00616.36
7.4.270.0030.00316.50
7.4.260.0000.00716.35
7.4.250.0070.00016.36
7.4.240.0030.00316.38
7.4.230.0030.00316.54
7.4.220.0000.01716.43
7.4.210.0090.00616.41
7.4.200.0080.00016.22
7.4.160.0030.01316.50
7.4.150.0120.00617.40
7.4.140.0070.01117.86
7.4.130.0110.00816.23
7.4.120.0130.01216.42
7.4.110.0000.01716.56
7.4.100.0090.01216.34
7.4.90.0100.00716.54
7.4.80.0090.01219.39
7.4.70.0060.00916.24
7.4.60.0100.00716.43
7.4.50.0030.01216.22
7.4.40.0120.00616.51
7.4.30.0100.01016.50
7.4.00.0060.00614.90
7.3.330.0000.00513.17
7.3.320.0050.00013.03
7.3.310.0040.00416.05
7.3.300.0000.00716.18
7.3.290.0100.00416.19
7.3.280.0090.01116.20
7.3.270.0070.01017.40
7.3.260.0100.00716.43
7.3.250.0060.01116.41
7.3.240.0120.00816.39
7.3.230.0090.00916.39
7.3.210.0120.00616.26
7.3.200.0120.00316.11
7.3.190.0150.00316.24
7.3.180.0060.00916.35
7.3.170.0160.00416.42
7.3.160.0090.00916.20
7.2.330.0090.00916.19
7.2.320.0030.01516.48
7.2.310.0100.00616.32
7.2.300.0060.01216.24
7.2.290.0120.00616.36
7.2.60.0070.01016.46
7.2.00.0040.00819.42
7.1.200.0070.00015.71
7.1.100.0060.00617.67
7.1.70.0000.01016.89
7.1.60.0090.01519.52
7.1.50.0090.00616.94
7.1.00.0070.07322.31
7.0.200.0000.00916.49
7.0.60.0070.08320.01
7.0.50.0070.08017.89
7.0.40.0100.06020.14
7.0.30.0300.07720.16
7.0.20.0470.06320.22
7.0.10.0130.07720.33
7.0.00.0030.05020.09
5.6.280.0030.07020.87
5.6.210.0070.06320.77
5.6.200.0100.08318.18
5.6.190.0130.08020.46
5.6.180.0330.04020.68
5.6.170.0230.08720.47
5.6.160.0170.07320.56
5.6.150.0030.05018.25
5.6.140.0030.05718.20
5.6.130.0070.04318.28
5.6.120.0000.05721.00
5.6.110.0070.04021.02
5.6.100.0170.07320.98
5.6.90.0130.07320.88
5.6.80.0070.06020.44
5.5.350.0100.03020.44
5.5.340.0100.05317.98
5.5.330.0100.07020.21
5.5.320.0170.08320.21
5.5.310.0130.04320.19
5.5.300.0070.03717.95
5.5.290.0100.08017.95
5.5.280.0130.05320.96
5.5.270.0070.06320.84
5.5.260.0130.06720.86
5.5.250.0100.04320.78
5.5.240.0200.08020.26

preferences:
70.53 ms | 401 KiB | 5 Q