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); 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.73
8.3.50.0090.01022.05
8.3.40.0070.00718.48
8.3.30.0140.00318.66
8.3.20.0070.00020.16
8.3.10.0070.00023.70
8.3.00.0040.00419.66
8.2.180.0110.00716.38
8.2.170.0070.01422.96
8.2.160.0120.00620.39
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0060.00319.21
8.2.120.0080.00026.35
8.2.110.0040.00722.07
8.2.100.0060.00617.91
8.2.90.0050.00319.04
8.2.80.0080.00017.97
8.2.70.0000.00917.38
8.2.60.0050.00317.80
8.2.50.0080.00018.07
8.2.40.0040.00422.37
8.2.30.0000.00720.53
8.2.20.0000.00817.52
8.2.10.0000.00717.84
8.2.00.0040.00417.98
8.1.280.0100.00325.92
8.1.270.0040.00420.38
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0060.00323.96
8.1.230.0070.00818.98
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0030.00617.10
8.1.190.0000.00817.10
8.1.180.0000.00818.10
8.1.170.0060.00318.49
8.1.160.0070.00020.67
8.1.150.0050.00218.75
8.1.140.0030.00619.41
8.1.130.0030.00317.43
8.1.120.0000.00717.38
8.1.110.0000.00817.29
8.1.100.0090.00017.24
8.1.90.0030.00617.33
8.1.80.0000.00717.31
8.1.70.0070.00017.23
8.1.60.0030.00517.47
8.1.50.0000.00817.45
8.1.40.0030.00617.42
8.1.30.0000.00817.38
8.1.20.0000.00717.51
8.1.10.0060.00317.44
8.1.00.0040.00417.29
8.0.300.0040.00418.77
8.0.290.0000.00716.58
8.0.280.0030.00318.30
8.0.270.0070.00017.05
8.0.260.0030.00317.25
8.0.250.0070.00016.86
8.0.240.0000.00716.78
8.0.230.0030.00316.80
8.0.220.0000.00716.77
8.0.210.0050.00216.74
8.0.200.0060.00016.78
8.0.190.0030.00716.90
8.0.180.0000.00716.74
8.0.170.0070.00016.85
8.0.160.0000.00716.72
8.0.150.0070.00016.81
8.0.140.0040.00416.74
8.0.130.0000.00613.25
8.0.120.0000.00716.83
8.0.110.0040.00416.79
8.0.100.0040.00416.71
8.0.90.0030.00516.61
8.0.80.0130.00316.82
8.0.70.0000.00716.68
8.0.60.0040.00416.87
8.0.50.0000.00716.70
8.0.30.0130.00516.93
8.0.20.0110.00917.40
8.0.10.0050.00317.06
8.0.00.0140.00716.66
7.4.330.0050.00016.77
7.4.320.0060.00016.38
7.4.300.0030.00316.47
7.4.290.0030.00316.33
7.4.280.0040.00416.38
7.4.270.0030.00316.38
7.4.260.0050.00316.46
7.4.250.0070.00016.25
7.4.240.0030.00316.46
7.4.230.0000.00716.43
7.4.220.0090.00916.43
7.4.210.0080.00616.50
7.4.200.0000.00716.54
7.4.160.0040.01116.38
7.4.150.0120.00617.40
7.4.140.0130.00817.86
7.4.130.0050.01416.42
7.4.120.0080.01416.33
7.4.110.0070.01016.24
7.4.100.0120.00916.21
7.4.90.0070.01716.30
7.4.80.0060.01219.39
7.4.70.0060.01016.32
7.4.60.0130.00316.48
7.4.50.0040.01416.23
7.4.40.0060.00916.37
7.4.30.0110.00616.36
7.4.00.0100.00714.82
7.3.330.0000.00613.10
7.3.320.0000.00613.19
7.3.310.0000.00716.13
7.3.300.0000.00616.17
7.3.290.0050.01116.24
7.3.280.0080.00916.22
7.3.270.0030.01317.40
7.3.260.0090.00916.25
7.3.250.0090.01016.27
7.3.240.0150.00616.44
7.3.230.0100.00616.39
7.3.210.0120.00916.29
7.3.200.0030.01416.18
7.3.190.0100.00616.28
7.3.180.0030.01316.23
7.3.170.0100.01016.30
7.3.160.0100.00716.32
7.3.10.0030.00816.46
7.3.00.0050.00516.36
7.2.330.0060.01216.49
7.2.320.0130.01316.42
7.2.310.0070.01116.18
7.2.300.0100.01016.34
7.2.290.0090.01216.52
7.2.130.0070.00716.62
7.2.120.0020.00916.61
7.2.110.0100.00816.54
7.2.100.0030.00816.53
7.2.90.0100.00416.76
7.2.80.0020.01316.81
7.2.70.0050.01216.90
7.2.60.0060.00916.74
7.2.50.0060.00616.60
7.2.40.0070.01016.62
7.2.30.0030.00716.60
7.2.20.0050.00716.70
7.2.10.0080.00516.71
7.2.00.0060.00917.37
7.1.250.0070.00915.65
7.1.240.0050.00515.65
7.1.230.0050.00815.51
7.1.220.0080.00615.62
7.1.210.0080.00515.58
7.1.200.0060.00615.50
7.1.190.0080.00615.62
7.1.180.0070.00615.69
7.1.170.0090.00515.45
7.1.160.0070.00315.47
7.1.150.0070.00715.73
7.1.140.0030.01115.60
7.1.130.0030.01115.73
7.1.120.0020.01015.57
7.1.110.0100.00315.74
7.1.100.0060.00716.52
7.1.90.0090.00315.55
7.1.80.0070.00915.75
7.1.70.0040.00416.21
7.1.60.0060.01016.91
7.1.50.0060.00516.06
7.1.40.0030.01015.66
7.1.30.0030.01015.69
7.1.20.0080.00415.68
7.1.10.0040.00915.59
7.1.00.0090.02718.01
7.0.330.0070.00715.30
7.0.320.0000.00815.34
7.0.310.0090.00415.23
7.0.300.0070.00815.32
7.0.290.0100.00515.44
7.0.280.0080.00515.21
7.0.270.0070.00715.31
7.0.260.0050.00615.44
7.0.250.0070.00815.25
7.0.240.0100.00815.30
7.0.230.0000.01015.29
7.0.220.0050.01015.34
7.0.210.0060.00615.46
7.0.200.0060.00815.79
7.0.190.0050.00815.33
7.0.180.0080.00515.31
7.0.170.0050.00615.43
7.0.160.0030.00815.26
7.0.150.0080.00415.40
7.0.140.0070.00715.34
7.0.130.0040.00815.40
7.0.120.0030.00515.55
7.0.110.0040.00715.30
7.0.100.0050.00915.26
7.0.90.0060.00615.23
7.0.80.0020.00915.50
7.0.70.0030.00815.34
7.0.60.0050.03217.53
7.0.50.0010.01916.26
7.0.40.0110.02515.67
7.0.30.0110.02615.53
7.0.20.0140.03315.64
7.0.10.0080.03215.69
7.0.00.0070.01715.59
5.6.380.0060.01014.27
5.6.370.0030.01014.39
5.6.360.0050.00714.25
5.6.350.0090.00614.16
5.6.340.0050.01014.06
5.6.330.0010.01014.06
5.6.320.0070.00714.22
5.6.310.0020.01214.00
5.6.300.0020.01114.20
5.6.290.0050.00714.17
5.6.280.0050.02916.41
5.6.270.0050.00814.07
5.6.260.0080.00514.30
5.6.250.0040.01014.02
5.6.240.0020.01014.09
5.6.230.0050.00914.18
5.6.220.0070.00713.99
5.6.210.0090.03116.14
5.6.200.0030.02515.41
5.6.190.0040.02216.21
5.6.180.0190.02616.36
5.6.170.0130.02816.33
5.6.160.0100.02915.54
5.6.150.0040.03615.57
5.6.140.0080.02515.45
5.6.130.0070.01915.46
5.6.120.0030.03016.41
5.6.110.0050.03316.44
5.6.100.0060.01716.39
5.6.90.0090.03016.38
5.6.80.0050.01816.10
5.6.70.0030.01013.81
5.6.60.0060.00813.97
5.6.50.0110.00113.95
5.6.40.0050.01013.91
5.6.30.0100.00714.08
5.6.20.0060.00513.84
5.6.10.0080.00814.09
5.6.00.0060.00813.97
5.5.380.0030.00810.94
5.5.370.0070.00310.85
5.5.360.0010.01010.97
5.5.350.0140.02414.07
5.5.340.0080.02613.27
5.5.330.0040.03414.27
5.5.320.0040.02313.91
5.5.310.0060.01914.13
5.5.300.0060.01713.20
5.5.290.0050.02913.29
5.5.280.0030.03314.32
5.5.270.0060.03114.23
5.5.260.0020.01814.04
5.5.250.0080.02214.17
5.5.240.0020.02313.92
5.5.230.0010.00510.96
5.5.220.0020.00610.74
5.5.210.0010.00610.75
5.5.200.0020.00810.98
5.5.190.0030.00810.88
5.5.180.0040.00710.96
5.5.170.0050.00610.57
5.5.160.0030.00810.91
5.5.150.0000.00910.79
5.5.140.0030.01010.65
5.5.130.0050.00710.86
5.5.120.0010.00710.72
5.5.110.0060.00610.76
5.5.100.0050.00710.89
5.5.90.0040.00410.68
5.5.80.0060.00510.97
5.5.70.0030.00710.69
5.5.60.0020.01010.71
5.5.50.0030.00710.58
5.5.40.0070.00510.96
5.5.30.0070.00410.72
5.5.20.0000.01110.65
5.5.10.0030.00910.80
5.5.00.0010.00710.95

preferences:
57.62 ms | 401 KiB | 5 Q