3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); phpversion() >= "7.0.0" or die(); class FooBar { public $prop = '123'; } class BarFoo { public $prop = '312'; } function test () : FooBar { return new FooBar; } function test1 () : BarFoo { return new FooBar; } @var_dump(test1()); var_dump(test());

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)
7.4.10.0070.01114.95
7.4.00.0060.00615.12
7.3.130.0060.01215.06
7.3.120.0090.00914.90
7.3.110.0000.01514.90
7.3.100.0040.00715.04
7.3.90.0040.01214.70
7.3.80.0000.00914.82
7.3.70.0030.01314.57
7.3.60.0100.00714.57
7.3.50.0050.00514.58
7.3.40.0040.00714.50
7.3.30.0030.01214.85
7.3.20.0040.00416.68
7.3.10.0040.00816.83
7.3.00.0120.00316.77
7.2.260.0030.01714.90
7.2.250.0110.00715.07
7.2.240.0030.01314.98
7.2.230.0060.00615.20
7.2.220.0060.00615.12
7.2.210.0000.01315.04
7.2.200.0000.00915.05
7.2.190.0070.01014.76
7.2.180.0000.01415.14
7.2.170.0070.00714.75
7.2.160.0070.00715.05
7.2.150.0100.00317.04
7.2.140.0040.01216.89
7.2.130.0030.01016.96
7.2.120.0040.01516.86
7.2.110.0030.01616.82
7.2.100.0000.01316.80
7.2.90.0070.00716.86
7.2.80.0060.00916.89
7.2.70.0030.01016.75
7.2.60.0030.01016.82
7.2.50.0030.01016.87
7.2.40.0040.00716.82
7.2.30.0090.00016.90
7.2.20.0040.00816.91
7.2.10.0000.01616.66
7.2.00.0050.01018.26
7.1.330.0060.00915.82
7.1.320.0030.00815.84
7.1.310.0000.01315.77
7.1.300.0110.00415.76
7.1.290.0070.00715.79
7.1.280.0040.00815.69
7.1.270.0060.00315.64
7.1.260.0030.01015.89
7.1.250.0000.01215.77
7.1.240.0100.00615.69
7.1.230.0040.00815.56
7.1.220.0000.01115.43
7.1.210.0070.01015.56
7.1.200.0060.00615.75
7.1.190.0030.01415.93
7.1.180.0030.01015.85
7.1.170.0030.01015.67
7.1.160.0060.00615.79
7.1.150.0000.00815.66
7.1.140.0030.01215.73
7.1.130.0000.01715.50
7.1.120.0030.00715.70
7.1.110.0090.00615.60
7.1.100.0030.01016.64
7.1.90.0000.01415.68
7.1.80.0100.00315.81
7.1.70.0060.00716.32
7.1.60.0060.00617.62
7.1.50.0060.00816.30
7.1.40.0110.00415.70
7.1.30.0040.00415.78
7.1.20.0100.00315.70
7.1.10.0080.00815.64
7.1.00.0000.04619.10
7.0.330.0100.00315.18
7.0.320.0000.01215.33
7.0.310.0030.00715.47
7.0.300.0000.01315.41
7.0.290.0030.01015.15
7.0.280.0040.00815.38
7.0.270.0030.00915.38
7.0.260.0130.00015.49
7.0.250.0000.00815.54
7.0.240.0040.00715.22
7.0.230.0070.01015.47
7.0.220.0070.00715.38
7.0.210.0030.00915.46
7.0.200.0000.01016.14
7.0.190.0000.01215.37
7.0.180.0030.00715.36
7.0.170.0000.00715.40
7.0.160.0120.00315.34
7.0.150.0060.00615.46
7.0.140.0030.00815.44
7.0.130.0080.00415.37
7.0.120.0060.00915.50
7.0.110.0070.00715.40
7.0.100.0030.01015.37
7.0.90.0100.00315.44
7.0.80.0060.00915.45
7.0.70.0030.00915.60
7.0.60.0070.04217.47
7.0.50.0080.03316.65
7.0.40.0050.03216.66
7.0.30.0210.01916.74
7.0.20.0160.02016.73
7.0.10.0070.04716.84
7.0.00.0070.02216.77
5.6.400.0030.01013.82
5.6.390.0060.00913.93
5.6.380.0070.00413.86
5.6.370.0030.00613.98
5.6.360.0000.01114.40
5.6.350.0060.00314.09
5.6.340.0000.00914.25
5.6.330.0000.00814.23
5.6.320.0030.00914.27
5.6.310.0060.00314.38
5.6.300.0070.01014.34
5.6.290.0000.00914.11
5.6.280.0020.04017.51
5.6.270.0060.00314.20
5.6.260.0040.00814.26
5.6.250.0060.00914.14
5.6.240.0030.01114.20
5.6.230.0070.00714.15
5.6.220.0110.00314.36
5.6.210.0030.03217.43
5.6.200.0040.03016.09
5.6.190.0060.02117.39
5.6.180.0120.03517.37
5.6.170.0160.03817.18
5.6.160.0020.03017.28
5.6.150.0020.03516.22
5.6.140.0030.04816.34
5.6.130.0020.02516.10
5.6.120.0070.04317.57
5.6.110.0050.02617.50
5.6.100.0040.02617.59
5.6.90.0090.04017.51
5.6.80.0100.04017.05
5.6.70.0000.00813.85
5.6.60.0000.01414.15
5.6.50.0090.00614.05
5.6.40.0060.00614.25
5.6.30.0060.00714.24
5.6.20.0100.00314.12
5.6.10.0070.00713.94
5.6.00.0030.01014.16
5.5.380.0150.00013.91
5.5.370.0040.01114.25
5.5.360.0070.00713.79
5.5.350.0170.02017.25
5.5.340.0070.04515.86
5.5.330.0050.03017.33
5.5.320.0250.02517.29
5.5.310.0150.02217.23
5.5.300.0110.03316.00
5.5.290.0020.02416.02
5.5.280.0070.04517.40
5.5.270.0080.04317.51
5.5.260.0070.04417.29
5.5.250.0080.03017.33
5.5.240.1980.02017.02
5.5.230.0060.00614.21
5.5.220.0090.00613.69
5.5.210.0070.01013.95
5.5.200.0030.00913.82
5.5.190.0150.00413.83
5.5.180.0030.00914.04
5.5.170.0000.00814.01
5.5.160.0030.01013.71
5.5.150.0060.00313.94
5.5.140.0060.00614.20
5.5.130.0030.00913.92
5.5.120.0100.00313.99
5.5.110.0040.00814.31
5.5.100.0030.00613.82
5.5.90.0070.00714.04
5.5.80.0060.00914.30
5.5.70.0100.00714.01
5.5.60.0000.01213.88
5.5.50.0030.01014.05
5.5.40.0000.01413.87
5.5.30.0100.00013.80
5.5.20.0000.01014.14
5.5.10.0000.01113.81
5.5.00.0050.00313.68

preferences:
34.04 ms | 401 KiB | 5 Q