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 = NULL) { $this->id = $id; } } abstract class Object { } class Gallery extends Object { use tObjectID; } $x = new Gallery(); $x->setId(10); echo $x->getId(); $x->setId(NULL); echo $x->getId();

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.0110.00716.75
8.3.50.0110.00417.83
8.3.40.0070.01118.54
8.3.30.0110.00718.72
8.3.20.0060.00920.30
8.3.10.0070.00023.67
8.3.00.0000.00819.70
8.2.180.0060.01216.38
8.2.170.0100.01022.96
8.2.160.0030.01320.22
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0060.00319.08
8.2.120.0080.00026.35
8.2.110.0060.00322.29
8.2.100.0060.00617.90
8.2.90.0060.00318.92
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0050.00317.80
8.2.50.0000.00818.07
8.2.40.0000.00822.16
8.2.30.0040.00420.73
8.2.20.0030.00617.49
8.2.10.0040.00417.81
8.2.00.0040.00417.93
8.1.280.0100.00325.92
8.1.270.0040.00420.21
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0130.00323.98
8.1.230.0070.00718.98
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0050.00317.10
8.1.180.0000.00718.10
8.1.170.0030.00518.65
8.1.160.0070.00020.74
8.1.150.0000.00718.86
8.1.140.0080.00019.50
8.1.130.0070.00017.49
8.1.120.0070.00017.30
8.1.110.0070.00017.26
8.1.100.0000.00817.22
8.1.90.0000.01017.33
8.1.80.0000.00717.25
8.1.70.0050.00317.19
8.1.60.0040.00417.35
8.1.50.0000.00817.42
8.1.40.0000.00817.41
8.1.30.0030.00517.43
8.1.20.0020.00517.48
8.1.10.0040.00417.35
8.1.00.0040.00417.21
8.0.300.0080.00018.77
8.0.290.0040.00416.58
8.0.280.0030.00318.23
8.0.270.0000.00717.13
8.0.260.0030.00316.97
8.0.250.0000.00716.77
8.0.240.0070.00016.75
8.0.230.0030.00516.79
8.0.220.0040.00416.83
8.0.210.0040.00416.69
8.0.200.0030.00316.88
8.0.190.0040.00416.90
8.0.180.0030.00516.84
8.0.170.0040.00416.68
8.0.160.0060.00316.82
8.0.150.0030.00316.87
8.0.140.0030.00616.72
8.0.130.0050.00013.29
8.0.120.0040.00416.70
8.0.110.0040.00416.91
8.0.100.0040.00416.77
8.0.90.0040.00416.70
8.0.80.0060.00916.79
8.0.70.0000.00716.67
8.0.60.0040.00416.70
8.0.50.0000.00716.84
8.0.30.0090.00916.99
8.0.20.0100.01117.40
8.0.10.0040.00416.80
8.0.00.0120.00616.62
7.4.330.0000.00516.79
7.4.320.0000.00616.46
7.4.300.0030.00316.52
7.4.290.0000.00716.29
7.4.280.0050.00316.26
7.4.270.0030.00316.23
7.4.260.0000.00616.27
7.4.250.0050.00316.34
7.4.240.0000.00716.41
7.4.230.0000.00816.25
7.4.220.0030.01516.30
7.4.210.0060.00916.57
7.4.200.0030.00516.17
7.4.160.0070.00716.36
7.4.150.0080.01217.40
7.4.140.0080.01017.86
7.4.130.0110.00916.39
7.4.120.0100.01016.43
7.4.110.0070.01016.30
7.4.100.0150.00916.54
7.4.90.0140.00316.55
7.4.80.0160.00619.39
7.4.70.0090.00616.47
7.4.60.0100.00616.38
7.4.50.0020.01316.50
7.4.40.0070.01016.29
7.4.30.0120.00616.37
7.4.00.0060.00914.75
7.3.330.0050.00013.23
7.3.320.0030.00213.20
7.3.310.0040.00416.27
7.3.300.0040.00416.23
7.3.290.0100.00416.22
7.3.280.0080.01016.19
7.3.270.0070.01717.40
7.3.260.0170.00016.19
7.3.250.0090.00816.19
7.3.240.0080.01016.25
7.3.230.0100.01016.39
7.3.210.0130.00916.31
7.3.200.0070.01116.06
7.3.190.0140.00316.21
7.3.180.0160.00316.29
7.3.170.0120.00916.27
7.3.160.0060.00916.34
7.2.330.0120.01216.33
7.2.320.0120.01216.55
7.2.310.0110.00616.28
7.2.300.0030.01316.34
7.2.290.0100.00716.34
7.2.60.0120.00316.36
7.2.00.0070.01019.35
7.1.200.0000.01615.57
7.1.100.0060.00817.92
7.1.70.0000.00817.20
7.1.60.0090.01519.52
7.1.50.0030.01616.90
7.1.00.0000.07722.54
7.0.200.0060.00316.84
7.0.60.0070.05019.99
7.0.50.0000.09017.90
7.0.40.0170.07720.52
7.0.30.0330.04320.21
7.0.20.0300.07720.06
7.0.10.0170.07720.19
7.0.00.0000.04320.30
5.6.280.0070.07720.99
5.6.210.0070.07320.75
5.6.200.0070.05318.16
5.6.190.0100.09020.39
5.6.180.0370.03720.52
5.6.170.0330.07720.51
5.6.160.0100.06720.52
5.6.150.0030.08018.29
5.6.140.0070.08318.18
5.6.130.0070.03718.19
5.6.120.0030.08721.10
5.6.110.0000.04721.06
5.6.100.0130.07721.07
5.6.90.0070.04321.04
5.6.80.0070.07020.41
5.5.350.0070.05720.43
5.5.340.0100.06717.94
5.5.330.0070.07020.47
5.5.320.0270.07320.51
5.5.310.0300.05320.34
5.5.300.0070.04017.98
5.5.290.0130.07718.07
5.5.280.0130.04720.98
5.5.270.0000.05320.96
5.5.260.0100.06720.74
5.5.250.0070.07320.79
5.5.240.0300.06720.19

preferences:
34.54 ms | 400 KiB | 5 Q