3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class Collection { /** @var string */ private $type; /** * @param string $type */ public static function ofType($type) { $collection = new static(); $collection->type = $type; } } final class Person {} $col = Collection::ofType(Person::class); function parsePersonCollection(PersonCollection $coll) { } parsePersonCollection($col);

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.0120.00916.99
8.3.50.0110.00822.04
8.3.40.0070.00718.78
8.3.30.0000.01818.97
8.3.20.0000.00720.39
8.3.10.0080.00023.30
8.3.00.0000.00819.27
8.2.180.0100.01018.48
8.2.170.0110.00322.96
8.2.160.0070.00722.25
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0030.00619.13
8.2.120.0000.00826.35
8.2.110.0000.01020.52
8.2.100.0090.00317.91
8.2.90.0040.00419.17
8.2.80.0050.00317.97
8.2.70.0030.00917.50
8.2.60.0000.00817.90
8.2.50.0090.00018.07
8.2.40.0000.00819.39
8.2.30.0040.00420.66
8.2.20.0060.00317.61
8.2.10.0020.00517.96
8.2.00.0000.00717.94
8.1.280.0110.00425.92
8.1.270.0030.00622.19
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0030.00722.42
8.1.230.0040.00817.66
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0060.00317.25
8.1.190.0030.00517.13
8.1.180.0090.00018.10
8.1.170.0040.00420.37
8.1.160.0020.00522.02
8.1.150.0000.00718.85
8.1.140.0000.00819.55
8.1.130.0000.00717.66
8.1.120.0050.00217.32
8.1.110.0000.00817.44
8.1.100.0050.00317.30
8.1.90.0000.00817.42
8.1.80.0000.00817.41
8.1.70.0070.00017.45
8.1.60.0030.00717.60
8.1.50.0030.00517.47
8.1.40.0060.00317.56
8.1.30.0040.00417.68
8.1.20.0060.00317.68
8.1.10.0050.00317.49
8.1.00.0030.00717.52
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00718.44
8.0.270.0040.00417.21
8.0.260.0040.00417.21
8.0.250.0000.00716.95
8.0.240.0040.00417.00
8.0.230.0030.00516.83
8.0.220.0030.00516.80
8.0.210.0050.00216.89
8.0.200.0030.00316.96
8.0.190.0030.00617.01
8.0.180.0040.00416.84
8.0.170.0090.00316.91
8.0.160.0080.00016.82
8.0.150.0030.00316.76
8.0.140.0030.00816.70
8.0.130.0030.00313.33
8.0.120.0040.00416.77
8.0.110.0040.00416.83
8.0.100.0070.00016.77
8.0.90.0040.00416.76
8.0.80.0090.00616.94
8.0.70.0040.00416.97
8.0.60.0080.00016.79
8.0.50.0040.00416.70
8.0.30.0090.00917.01
8.0.20.0100.01117.40
8.0.10.0060.00317.03
8.0.00.0110.00816.78
7.4.330.0000.00516.79
7.4.320.0060.00016.45
7.4.300.0000.00616.62
7.4.290.0000.00716.55
7.4.280.0090.00016.56
7.4.270.0000.00716.63
7.4.260.0030.00316.56
7.4.250.0000.00716.49
7.4.240.0000.00816.62
7.4.230.0030.00316.61
7.4.220.0030.01416.46
7.4.210.0070.00716.58
7.4.200.0080.00016.57
7.4.160.0080.00816.64
7.4.150.0110.00617.40
7.4.140.0160.00717.86
7.4.130.0150.01316.59
7.4.120.0130.00716.45
7.4.110.0120.00616.35
7.4.100.0080.01216.59
7.4.90.0060.00916.61
7.4.80.0140.00319.39
7.4.70.0000.01616.68
7.4.60.0110.00716.50
7.4.50.0070.00716.42
7.4.40.0090.00916.49
7.4.30.0090.00916.55
7.4.00.0000.01115.04
7.3.330.0030.00313.23
7.3.320.0000.00513.19
7.3.310.0000.00716.26
7.3.300.0000.00616.43
7.3.290.0060.00916.36
7.3.280.0120.00516.36
7.3.270.0060.01517.40
7.3.260.0100.00716.43
7.3.250.0110.00716.36
7.3.240.0130.00616.39
7.3.230.0070.01416.39
7.3.210.0110.01116.42
7.3.200.0170.00016.62
7.3.190.0090.01316.53
7.3.180.0120.00616.24
7.3.170.0100.01016.33
7.3.160.0090.00616.52
7.2.330.0090.00916.61
7.2.320.0080.00816.58
7.2.310.0130.00316.61
7.2.300.0040.01216.46
7.2.290.0050.01416.40
7.2.60.0070.00716.81
7.2.00.0070.01119.55
7.1.200.0110.00415.62
7.1.100.0060.00917.86
7.1.70.0000.00717.13
7.1.60.0150.00819.48
7.1.50.0120.01216.54
7.1.00.0000.07322.37
7.0.200.0110.00014.54
7.0.60.0130.04719.93
7.0.50.0000.08717.96
7.0.40.0070.04720.24
7.0.30.0230.04320.11
7.0.20.0430.07020.31
7.0.10.0070.07720.22
7.0.00.0070.09320.23
5.6.280.0100.03321.08
5.6.210.0100.07020.50
5.6.200.0070.03718.19
5.6.190.0030.04320.41
5.6.180.0300.08020.62
5.6.170.0270.08020.45
5.6.160.0030.08020.54
5.6.150.0030.05018.18
5.6.140.0030.06018.18
5.6.130.0030.06318.15
5.6.120.0170.07320.98
5.6.110.0030.08321.13
5.6.100.0030.04321.00
5.6.90.0130.08020.99
5.6.80.0130.03320.52
5.5.350.3100.03320.42
5.5.340.0030.07717.98
5.5.330.0000.04320.57
5.5.320.0230.04720.35
5.5.310.0270.08020.20
5.5.300.0030.08317.97
5.5.290.0170.07017.98
5.5.280.0070.06320.88
5.5.270.0030.04320.76
5.5.260.0100.03720.84
5.5.250.0130.05720.71
5.5.240.0230.06320.14

preferences:
49.62 ms | 401 KiB | 5 Q