3v4l.org

run code in 300+ PHP versions simultaneously
<?php # THIS IS VERY SERIOUS :O # BY https://twitter.com/codelytv class_alias('Text', 'T'); class_alias('ListᐸTᐳ', 'ListᐸTextᐳ'); class Text { public $value; public function __construct(string $value) { $this->value = $value; } } class ListᐸTᐳ { public $elements; public function __construct(T ...$elements) { $this->elements = $elements; } } $listOfTexts = new ListᐸTextᐳ(new Text('first element'), new Text('second element')); var_dump($listOfTexts->elements);

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.0.0beta30.0080.01216.61
8.0.0beta20.0140.00616.60
8.0.0beta10.0110.01016.55
8.0.0alpha30.0120.01016.53
8.0.0alpha20.0120.01016.43
8.0.0alpha10.0130.00916.39
7.4.100.0110.01016.41
7.4.90.0120.00916.37
7.4.80.0120.00916.38
7.4.70.0120.00916.36
7.4.60.0110.01016.36
7.4.50.0120.01016.37
7.4.40.0120.00916.32
7.4.30.0110.01016.34
7.4.20.0110.01016.37
7.4.10.0130.00816.36
7.4.00.0100.01016.44
7.3.220.0110.00816.40
7.3.210.0120.00916.24
7.3.200.0110.01016.24
7.3.190.0130.00816.26
7.3.180.0120.00916.28
7.3.170.0120.00916.27
7.3.160.0120.00916.26
7.3.150.0110.01016.30
7.3.140.0120.00916.27
7.3.130.0110.00916.24
7.3.120.0110.01016.28
7.3.110.0130.00816.21
7.3.100.0130.00916.22
7.3.90.0120.00916.26
7.3.80.0130.00816.25
7.3.70.0130.00816.25
7.3.60.0130.00916.21
7.3.50.0120.00916.25
7.3.40.0120.00916.21
7.3.30.0110.00916.22
7.3.20.0140.01016.25
7.3.10.0160.00916.25
7.3.00.0140.00916.22
7.2.330.0130.01016.44
7.2.320.0110.01016.47
7.2.310.0120.00916.48
7.2.300.0100.01116.45
7.2.290.0120.00916.49
7.2.280.0110.01016.49
7.2.270.0110.01116.52
7.2.260.0120.00916.46
7.2.250.0120.01016.49
7.2.240.0110.01016.44
7.2.230.0120.01016.52
7.2.220.0120.00916.52
7.2.210.0130.00916.49
7.2.200.0110.01016.44
7.2.190.0120.01016.45
7.2.180.0120.01016.41
7.2.170.0110.01116.48
7.2.160.0110.01016.45
7.2.150.0120.01016.51
7.2.140.0120.01116.55
7.2.130.0130.00916.54
7.2.120.0130.01016.53
7.2.110.0140.00916.49
7.2.100.0120.01016.55
7.2.90.0140.01016.53
7.2.80.0140.00916.53
7.2.70.0190.01016.55
7.2.60.0150.00816.51
7.2.50.0140.01016.53
7.2.40.0140.01016.55
7.2.30.0140.01016.59
7.2.20.0130.01016.53
7.2.10.0150.00916.51
7.2.00.0120.01116.49
7.1.330.0110.00815.38
7.1.320.0300.00715.49
7.1.310.0190.00015.48
7.1.300.0150.00815.67
7.1.290.0060.01215.62
7.1.280.0100.01015.52
7.1.270.0200.00315.48
7.1.260.0080.01115.52
7.1.250.0090.00915.51
7.1.240.0070.01015.45
7.1.230.0100.01015.58
7.1.220.0130.00815.47
7.1.210.0140.00915.36
7.1.200.0070.01115.56
7.1.190.0060.01215.54
7.1.180.0150.00315.57
7.1.170.0180.00015.43
7.1.160.0150.00515.64
7.1.150.0110.00715.60
7.1.140.0140.00715.41
7.1.130.0100.01315.50
7.1.120.0090.01215.59
7.1.110.0040.01915.33
7.1.100.0060.01315.56
7.1.90.0070.01115.52
7.1.80.0180.00015.49
7.1.70.0090.00915.48
7.1.60.0060.00915.25
7.1.50.0060.01015.68
7.1.40.0130.00315.63
7.1.30.0150.00315.66
7.1.20.0190.01015.50
7.1.10.0100.01015.49
7.1.00.0080.00815.39
7.0.330.0070.01115.04
7.0.320.0120.00615.10
7.0.310.0040.01315.18
7.0.300.0110.01115.26
7.0.290.0090.00915.42
7.0.280.0060.01115.18
7.0.270.0210.00715.02
7.0.260.0110.01114.98
7.0.250.0090.00915.22
7.0.240.0060.01014.98
7.0.230.0200.00415.17
7.0.220.0110.00515.09
7.0.210.0100.00715.01
7.0.200.0080.00815.39
7.0.190.0100.00715.00
7.0.180.0130.00315.26
7.0.170.0090.00915.23
7.0.160.0180.00015.30
7.0.150.0110.00615.05
7.0.140.0130.00315.14
7.0.130.0070.01315.37
7.0.120.0000.01715.32
7.0.110.0090.00615.30
7.0.100.0150.00515.17
7.0.90.0160.00815.09
7.0.80.0490.00714.99
7.0.70.0060.01015.30
7.0.60.0150.00615.31
7.0.50.0080.00815.04
7.0.40.0100.00715.11
7.0.30.0090.00815.21
7.0.20.0170.00614.90
7.0.10.0120.00415.22
7.0.00.0130.00315.20
5.6.400.0170.00316.13
5.6.390.0150.00915.64
5.6.380.0120.00615.94
5.6.370.0140.00615.66
5.6.360.0140.00715.85
5.6.350.0170.00316.00
5.6.340.0060.01315.77
5.6.330.0130.01315.72
5.6.320.0150.00615.72
5.6.310.0150.00615.70
5.6.300.0060.01216.00
5.6.290.0090.01015.80
5.6.280.0070.01115.80
5.6.270.0150.00315.77
5.6.260.0150.00315.97
5.6.250.0120.00915.73
5.6.240.0100.01715.76
5.6.230.0030.01615.76
5.6.220.0140.00415.82
5.6.210.0070.01515.96
5.6.200.0190.00015.88
5.6.190.0060.01215.93
5.6.180.0160.00615.83
5.6.170.0100.01015.80
5.6.160.0070.01115.71
5.6.150.0130.00615.75
5.6.140.0030.01615.61
5.6.130.0060.01215.64
5.6.120.0030.02315.64
5.6.110.0030.01515.88
5.6.100.0110.01115.74
5.6.90.0030.01715.83
5.6.80.0090.00915.60
5.6.70.0050.01515.57
5.6.60.0150.00615.72
5.6.50.0080.01215.55
5.6.40.0160.01015.39
5.6.30.0130.01415.51
5.6.20.0190.00315.54
5.6.10.0060.01615.32
5.6.00.0120.01615.57
5.5.380.0250.00815.78
5.5.370.0270.00315.67
5.5.360.0220.00915.52
5.5.350.0200.01215.50
5.5.340.0190.01315.54
5.5.330.0240.00915.82
5.5.320.0200.01215.66
5.5.310.0220.00715.45
5.5.300.0130.02015.77
5.5.290.0150.01515.73
5.5.280.0170.01515.91
5.5.270.0200.00915.43
5.5.260.0170.01415.61
5.5.250.0140.01415.51
5.5.240.0260.00615.57
5.5.230.0170.01315.50
5.5.220.0220.00715.58
5.5.210.0220.00915.46
5.5.200.0230.01015.68
5.5.190.0270.00815.34
5.5.180.0130.01915.65
5.5.170.0160.01615.63
5.5.160.0180.01215.79
5.5.150.0210.00715.57
5.5.140.0170.01215.78
5.5.130.0200.01015.58
5.5.120.0210.00715.43
5.5.110.0310.00415.48
5.5.100.0180.01115.69
5.5.90.0190.01315.63
5.5.80.0210.01215.75
5.5.70.0180.01315.58
5.5.60.0190.01015.49
5.5.50.0160.01615.43
5.5.40.0210.00715.51
5.5.30.0190.01215.28
5.5.20.0220.00615.73
5.5.10.0220.00615.55
5.5.00.0270.00915.40
5.4.450.0160.00613.38
5.4.440.0170.00613.38
5.4.430.0220.00013.38
5.4.420.0220.00313.38
5.4.410.0240.00013.38
5.4.400.0130.01013.38
5.4.390.0220.00413.38
5.4.380.0170.00713.38
5.4.370.0190.00413.38
5.4.360.0130.01313.38
5.4.350.0130.00813.38
5.4.340.0280.00713.38
5.4.330.0110.01513.38
5.4.320.0160.00613.38
5.4.310.0190.00413.38
5.4.300.0160.00513.38
5.4.290.0170.00313.38
5.4.280.0170.01013.38
5.4.270.0120.00913.38
5.4.260.0150.00913.38
5.4.250.0120.01213.38
5.4.240.0210.00513.38
5.4.230.0100.01613.38
5.4.220.0180.00613.38
5.4.210.0150.01013.38
5.4.200.0160.00713.38
5.4.190.0110.01113.38
5.4.180.0130.01013.38
5.4.170.0210.00513.38
5.4.160.0220.00013.38
5.4.150.0170.00513.38
5.4.140.0160.00613.38
5.4.130.0200.00313.38
5.4.120.0150.00813.38
5.4.110.0150.00813.38
5.4.100.0210.00413.38
5.4.90.0120.00913.38
5.4.80.0180.00313.38
5.4.70.0130.00713.38
5.4.60.0120.00913.38
5.4.50.0210.00713.38
5.4.40.0140.01013.38
5.4.30.0170.00913.38
5.4.20.0190.00813.38
5.4.10.0240.00013.38
5.4.00.0110.01513.38
5.3.290.0050.02013.38
5.3.280.0240.00313.38
5.3.270.0220.00313.38
5.3.260.0200.00313.38
5.3.250.0130.01313.38
5.3.240.0130.01313.38
5.3.230.0150.01213.38
5.3.220.0240.00013.38
5.3.210.0170.00613.38
5.3.200.0130.01013.38
5.3.190.0120.01213.38
5.3.180.0190.00313.38
5.3.170.0140.00913.38
5.3.160.0170.01013.38
5.3.150.0130.01313.38
5.3.140.0230.00913.38
5.3.130.0130.01313.38
5.3.120.0150.01113.38
5.3.110.0160.01213.38
5.3.100.0130.01013.38
5.3.90.0170.00613.38
5.3.80.0180.00613.38
5.3.70.0110.01513.38
5.3.60.0190.00813.38
5.3.50.0130.01413.38
5.3.40.0130.01013.38
5.3.30.0130.00913.38
5.3.20.0130.00913.38
5.3.10.0200.00313.38
5.3.00.0190.00313.38
5.2.170.0150.00713.38
5.2.160.0120.00813.38
5.2.150.0110.00713.38
5.2.140.0130.00413.38
5.2.130.0110.00913.38
5.2.120.0150.00313.38
5.2.110.0130.00613.38
5.2.100.0160.00313.38
5.2.90.0000.01813.38
5.2.80.0100.01013.38
5.2.70.0140.00513.38
5.2.60.0070.01113.38
5.2.50.0110.00813.38
5.2.40.0060.01213.38
5.2.30.0170.00313.38
5.2.20.0070.01113.38
5.2.10.0140.00513.38
5.2.00.0140.00613.38
5.1.60.0120.00613.38
5.1.50.0030.01413.38
5.1.40.0080.00813.38
5.1.30.0090.01013.38
5.1.20.0070.01013.38
5.1.10.0060.01013.38
5.1.00.0080.00813.38
5.0.50.0070.00713.38
5.0.40.0090.00513.38
5.0.30.0100.00513.38
5.0.20.0080.00613.38
5.0.10.0070.00713.38
5.0.00.0100.00513.38
4.4.90.0080.00313.38
4.4.80.0050.00513.38
4.4.70.0040.00413.38
4.4.60.0030.00613.38
4.4.50.0060.00313.38
4.4.40.0030.00613.38
4.4.30.0090.00013.38
4.4.20.0030.00713.38
4.4.10.0040.00413.38
4.4.00.0040.00513.38
4.3.110.0090.00013.38
4.3.100.0040.00513.38
4.3.90.0020.00713.38
4.3.80.0060.00313.38
4.3.70.0070.00313.38
4.3.60.0080.00213.38
4.3.50.0040.00713.38
4.3.40.0040.00413.38
4.3.30.0030.00713.38
4.3.20.0050.00313.38
4.3.10.0080.00013.38
4.3.00.0040.00413.38