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 {} function test () : FooBar { return new FooBar; } function test1 () : BarFoo { return new FooBar; } var_dump(test()); var_dump(test1());

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.3.00.0110.00416.57
7.2.130.0070.00716.60
7.2.120.0030.00616.86
7.2.110.0000.01016.88
7.2.100.0060.00916.71
7.2.90.0030.01316.80
7.2.80.0020.01216.61
7.2.70.0040.01216.68
7.2.60.0090.00516.66
7.2.50.0030.00616.77
7.2.40.0040.00716.57
7.2.30.0120.00616.46
7.2.20.0100.00316.61
7.2.10.0000.01416.81
7.2.00.0060.00918.12
7.1.250.0060.00615.66
7.1.240.0070.00715.71
7.1.230.0100.00315.73
7.1.220.0120.00315.65
7.1.210.0030.01015.47
7.1.200.0080.00715.46
7.1.190.0060.00615.57
7.1.180.0090.00915.32
7.1.170.0040.00415.77
7.1.160.0000.00915.74
7.1.150.0030.01115.64
7.1.140.0000.01415.82
7.1.130.0030.01015.61
7.1.120.0060.00315.49
7.1.110.0030.00715.81
7.1.100.0070.00816.87
7.1.90.0100.00615.75
7.1.80.0090.00315.55
7.1.70.0050.00916.35
7.1.60.0130.00817.64
7.1.50.0080.00616.14
7.1.40.0110.00415.75
7.1.30.0070.00715.41
7.1.20.0030.00715.73
7.1.10.0030.00615.75
7.1.00.0030.04218.83
7.0.330.0030.01015.42
7.0.320.0030.00615.43
7.0.310.0030.00915.32
7.0.300.0030.01015.03
7.0.290.0030.00615.26
7.0.280.0070.00715.38
7.0.270.0070.00315.37
7.0.260.0040.01115.07
7.0.250.0050.00615.34
7.0.240.0120.00315.51
7.0.230.0030.00915.23
7.0.220.0070.00315.34
7.0.210.0000.01015.35
7.0.200.0020.01016.12
7.0.190.0060.00615.55
7.0.180.0040.00815.15
7.0.170.0070.00715.13
7.0.160.0060.00615.45
7.0.150.0050.00515.34
7.0.140.0000.01115.41
7.0.130.0000.00915.48
7.0.120.0000.01115.28
7.0.110.0040.00415.41
7.0.100.0030.01015.22
7.0.90.0060.00315.25
7.0.80.0070.00715.29
7.0.70.0090.00615.17
7.0.60.0060.04617.71
7.0.50.0080.02016.64
7.0.40.0080.04516.76
7.0.30.0150.03216.86
7.0.20.0110.02616.83
7.0.10.0140.04016.79
7.0.00.0040.02516.79
5.6.380.0030.00713.93
5.6.370.0000.01114.16
5.6.360.0000.00714.31
5.6.350.0100.00314.32
5.6.340.0030.01014.29
5.6.330.0060.00614.31
5.6.320.0100.00713.59
5.6.310.0060.00614.09
5.6.300.0120.00314.19
5.6.290.0060.00613.99
5.6.280.0100.04017.53
5.6.270.0040.01114.16
5.6.260.0030.00914.23
5.6.250.0100.00314.13
5.6.240.0000.01314.03
5.6.230.0070.00714.13
5.6.220.0050.00514.09
5.6.210.0090.02917.33
5.6.200.0110.04016.15
5.6.190.0040.02717.29
5.6.180.0120.03017.20
5.6.170.0160.04517.23
5.6.160.0050.04517.24
5.6.150.0020.02616.30
5.6.140.0030.04716.13
5.6.130.0050.02316.11
5.6.120.0020.03817.47
5.6.110.0080.02017.45
5.6.100.0000.04317.48
5.6.90.0050.02917.49
5.6.80.0100.03217.20
5.6.70.0110.00013.81
5.6.60.0100.00314.05
5.6.50.0030.00614.11
5.6.40.0030.01414.01
5.6.30.0070.00714.14
5.6.20.0040.00714.11
5.6.10.0070.00413.93
5.6.00.0080.00713.82
5.5.380.0000.01011.00
5.5.370.0090.00311.00
5.5.360.0000.01011.00
5.5.350.0070.04915.71
5.5.340.0050.02714.50
5.5.330.0080.04315.66
5.5.320.0270.04015.63
5.5.310.0180.01715.62
5.5.300.0080.03314.49
5.5.290.0050.03314.51
5.5.280.0060.02515.95
5.5.270.0020.04915.92
5.5.260.0050.04415.98
5.5.250.0100.03315.80
5.5.240.2170.02815.65
5.5.230.0030.00611.00
5.5.220.0030.00311.00
5.5.210.0090.00311.02
5.5.200.0060.00611.00
5.5.190.0030.00711.00
5.5.180.0000.01111.00
5.5.170.0070.00011.00
5.5.160.0000.01011.00
5.5.150.0060.00611.00
5.5.140.0070.00311.00
5.5.130.0000.00711.00
5.5.120.0000.00611.00
5.5.110.0030.00711.00
5.5.100.0040.00411.00
5.5.90.0000.00511.00
5.5.80.0000.01011.00
5.5.70.0040.00411.00
5.5.60.0030.00311.00
5.5.50.0040.00811.02
5.5.40.0050.00211.00
5.5.30.0070.00411.00
5.5.20.0040.00411.00
5.5.10.0070.00011.00
5.5.00.0090.00311.00

preferences:
41.65 ms | 401 KiB | 5 Q