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) { $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.0150.00616.75
8.3.50.0240.00421.83
8.3.40.0110.00418.57
8.3.30.0120.00618.59
8.3.20.0000.01420.29
8.3.10.0080.00023.45
8.3.00.0080.00019.84
8.2.180.0090.00616.63
8.2.170.0110.01122.96
8.2.160.0070.01420.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0110.00019.30
8.2.120.0030.00526.35
8.2.110.0050.00520.58
8.2.100.0040.00817.59
8.2.90.0080.00017.75
8.2.80.0000.00818.48
8.2.70.0000.00817.38
8.2.60.0030.00517.38
8.2.50.0050.00318.05
8.2.40.0070.00018.09
8.2.30.0000.00717.89
8.2.20.0040.00417.54
8.2.10.0050.00217.87
8.2.00.0000.00717.95
8.1.280.0170.00325.92
8.1.270.0050.00320.25
8.1.260.0000.00828.09
8.1.250.0080.00028.09
8.1.240.0090.00317.35
8.1.230.0120.00020.96
8.1.220.0000.00818.52
8.1.210.0000.00818.77
8.1.200.0040.00417.23
8.1.190.0060.00316.85
8.1.180.0040.00418.10
8.1.170.0000.00818.61
8.1.160.0040.00418.88
8.1.150.0000.00818.73
8.1.140.0050.00519.31
8.1.130.0040.00417.50
8.1.120.0000.00717.34
8.1.110.0070.00017.29
8.1.100.0000.00817.20
8.1.90.0040.00417.26
8.1.80.0000.00717.23
8.1.70.0040.00417.28
8.1.60.0040.00417.43
8.1.50.0040.00417.41
8.1.40.0000.00817.32
8.1.30.0000.00817.46
8.1.20.0050.00317.42
8.1.10.0040.00417.44
8.1.00.0040.00417.30
8.0.300.0050.00218.77
8.0.290.0050.00216.63
8.0.280.0030.00518.32
8.0.270.0040.00417.14
8.0.260.0030.00317.07
8.0.250.0070.00016.89
8.0.240.0000.00816.78
8.0.230.0000.00716.80
8.0.220.0080.00016.84
8.0.210.0000.00716.84
8.0.200.0050.00216.87
8.0.190.0060.00316.88
8.0.180.0000.00816.87
8.0.170.0000.00816.83
8.0.160.0000.00716.86
8.0.150.0000.00716.66
8.0.140.0050.00516.71
8.0.130.0000.00613.16
8.0.120.0070.00016.81
8.0.110.0050.00316.66
8.0.100.0050.00316.89
8.0.90.0000.00816.63
8.0.80.0070.01016.89
8.0.70.0040.00416.78
8.0.60.0070.00016.84
8.0.50.0040.00416.89
8.0.30.0050.01117.00
8.0.20.0090.01117.40
8.0.10.0070.00017.00
8.0.00.0100.00716.59
7.4.330.0030.00316.78
7.4.320.0030.00316.35
7.4.300.0000.00616.38
7.4.290.0070.00016.48
7.4.280.0040.00416.24
7.4.270.0030.00316.46
7.4.260.0070.00016.45
7.4.250.0040.00416.40
7.4.240.0020.00516.38
7.4.230.0000.00716.23
7.4.220.0140.00616.23
7.4.210.0140.00016.41
7.4.200.0050.00316.23
7.4.160.0100.00616.25
7.4.150.0090.00917.40
7.4.140.0140.00317.86
7.4.130.0100.00816.42
7.4.120.0080.01016.35
7.4.110.0100.00716.52
7.4.100.0200.00316.41
7.4.90.0000.01616.60
7.4.80.0090.00919.39
7.4.70.0130.00316.48
7.4.60.0100.00616.29
7.4.50.0130.00316.18
7.4.40.0110.00716.54
7.4.30.0160.00916.18
7.4.00.0060.00614.88
7.3.330.0020.00213.06
7.3.320.0000.00513.24
7.3.310.0000.00716.33
7.3.300.0000.00716.23
7.3.290.0060.00916.17
7.3.280.0080.01016.21
7.3.270.0090.00617.40
7.3.260.0150.00316.44
7.3.250.0060.01316.30
7.3.240.0070.01016.43
7.3.230.0120.00916.39
7.3.210.0030.01316.28
7.3.200.0110.00616.21
7.3.190.0000.01816.26
7.3.180.0130.00316.47
7.3.170.0110.00516.29
7.3.160.0080.00816.26
7.3.10.0060.00616.53
7.3.00.0040.01116.52
7.2.330.0090.00916.61
7.2.320.0130.01016.23
7.2.310.0060.01216.47
7.2.300.0150.00716.52
7.2.290.0060.01116.50
7.2.130.0070.00716.58
7.2.120.0030.00916.87
7.2.110.0090.00316.76
7.2.100.0000.01316.73
7.2.90.0070.00716.88
7.2.80.0040.00416.70
7.2.70.0040.01216.94
7.2.60.0040.00616.79
7.2.50.0080.00316.80
7.2.40.0070.01116.41
7.2.30.0110.00316.59
7.2.20.0040.00716.52
7.2.10.0060.00616.91
7.2.00.0020.01017.98
7.1.250.0040.01515.75
7.1.200.0100.00315.45
7.1.100.0040.01117.89
7.1.70.0070.01017.20
7.1.60.0130.01019.52
7.1.50.0100.01316.65
7.1.00.0070.07322.35
7.0.200.0000.01016.75
7.0.60.0100.08319.93
7.0.50.0000.04717.93
7.0.40.0070.09020.24
7.0.30.0270.05320.38
7.0.20.0270.05320.07
7.0.10.0070.06020.21
7.0.00.0030.04020.07
5.6.280.0000.07020.87
5.6.210.0070.07720.67
5.6.200.0200.07718.16
5.6.190.0030.04720.48
5.6.180.0400.06020.64
5.6.170.0170.06020.57
5.6.160.0100.03720.54
5.6.150.0070.08318.29
5.6.140.0000.04718.23
5.6.130.0030.04018.14
5.6.120.0030.04021.01
5.6.110.0100.07321.11
5.6.100.0030.07721.14
5.6.90.0200.05320.88
5.6.80.0030.04320.41
5.5.350.0130.05720.41
5.5.340.0130.06717.99
5.5.330.0030.09020.57
5.5.320.0430.08020.42
5.5.310.0100.05020.23
5.5.300.0100.05018.00
5.5.290.0100.08017.98
5.5.280.0100.04720.87
5.5.270.0100.06020.80
5.5.260.0000.04320.87
5.5.250.0070.08720.62
5.5.240.0170.08020.04

preferences:
53.4 ms | 401 KiB | 5 Q