3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); class Foo { /** * @param int $i * @return void */ public function bar($i) {} public function baz(int $i): void {} } /** * @method string bar(bool $b, object $o) * @method string baz(bool $b, object $o) */ class Woo extends Foo {} $w = new Woo(); $r1 = $w->bar(true, new \stdClass); $r2 = $w->baz(true, new \stdClass); //$r3 = $w->bar(123); //$r4 = $w->baz(123); function test(float $f) {}; test($r1); test($r2); //test($r3); //test($r4);

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.4.120.0060.00420.53
8.4.110.0080.00318.81
8.4.100.0130.00718.27
8.4.90.0130.00718.83
8.4.80.0120.00818.07
8.4.70.0080.00417.91
8.4.60.0080.01218.57
8.4.50.0100.01118.08
8.4.40.0000.00817.79
8.4.30.0120.00917.64
8.4.20.0100.01019.43
8.4.10.0000.01019.39
8.3.250.0110.00818.71
8.3.240.0110.00516.86
8.3.230.0150.00416.61
8.3.220.0060.00319.13
8.3.210.0040.00416.70
8.3.200.0050.00416.62
8.3.190.0130.00718.83
8.3.180.0070.00316.59
8.3.170.0070.01119.04
8.3.160.0060.00316.81
8.3.150.0070.01116.70
8.3.140.0040.00416.92
8.3.130.0080.00018.52
8.3.120.0060.00318.73
8.3.110.0050.00320.94
8.3.100.0000.00824.06
8.3.90.0080.01226.77
8.3.80.0060.00318.30
8.3.70.0160.00318.55
8.3.60.0150.00316.63
8.3.50.0100.00817.43
8.3.40.0180.00418.84
8.3.30.0110.00418.50
8.3.20.0050.00220.29
8.3.10.0040.00422.09
8.3.00.0050.00323.66
8.2.290.0130.00520.72
8.2.280.0110.01220.13
8.2.270.0140.00017.29
8.2.260.0040.00416.99
8.2.250.0070.01018.76
8.2.240.0030.00617.30
8.2.230.0060.00322.58
8.2.220.0090.00037.54
8.2.210.0070.01126.77
8.2.200.0060.00318.41
8.2.190.0070.00716.58
8.2.180.0120.00918.18
8.2.170.0150.00022.96
8.2.160.0160.00619.21
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00519.35
8.2.110.0040.01421.00
8.2.100.0040.00717.78
8.2.90.0070.00317.63
8.2.80.0040.00418.73
8.2.70.0050.00317.63
8.2.60.0080.00017.25
8.2.50.0060.00317.63
8.2.40.0000.00720.30
8.2.30.0040.00420.97
8.2.20.0030.00617.90
8.2.10.0040.00418.01
8.2.00.0060.00318.09
8.1.330.0110.00720.36
8.1.320.0090.01216.33
8.1.310.0060.00918.23
8.1.300.0060.00318.07
8.1.290.0060.00318.88
8.1.280.0110.00425.92
8.1.270.0040.00423.91
8.1.260.0040.00426.35
8.1.250.0140.00028.09
8.1.240.0090.00019.20
8.1.230.0090.00317.64
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0000.00917.23
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0080.00018.65
8.1.160.0040.00418.83
8.1.150.0000.00720.08
8.1.140.0040.00419.52
8.1.130.0000.00720.89
8.1.120.0030.00617.46
8.1.110.0000.00717.36
8.1.100.0070.00017.30
8.1.90.0000.00717.27
8.1.80.0050.00317.28
8.1.70.0000.00717.36
8.1.60.0040.00417.47
8.1.50.0040.00417.45
8.1.40.0000.00817.41
8.1.30.0030.00517.66
8.1.20.0000.00817.67
8.1.10.0000.00817.60
8.1.00.0040.00417.50
8.0.300.0040.00418.92
8.0.290.0040.00416.75
8.0.280.0000.00718.38
8.0.270.0030.00517.20
8.0.260.0030.00618.40
8.0.250.0070.00016.95
8.0.240.0030.00316.96
8.0.230.0000.00716.93
8.0.220.0050.00316.90
8.0.210.0070.00016.80
8.0.200.0000.00816.86
8.0.190.0070.00416.82
8.0.180.0050.00216.82
8.0.170.0070.00016.81
8.0.160.0000.00716.86
8.0.150.0050.00216.74
8.0.140.0000.00916.89
8.0.130.0000.00613.32
8.0.120.0000.00716.76
8.0.110.0000.00716.76
8.0.100.0040.00416.93
8.0.90.0040.00416.79
8.0.80.0040.01116.81
8.0.70.0000.00816.89
8.0.60.0050.00316.88
8.0.50.0050.00217.01
8.0.30.0110.01217.12
8.0.20.0120.00717.40
8.0.10.0040.00416.88
8.0.00.0060.01116.94
7.4.330.0000.00715.55
7.4.320.0000.00816.41
7.4.300.0000.00716.48
7.4.290.0030.00716.54
7.4.280.0000.00716.50
7.4.270.0030.00316.53
7.4.260.0070.00016.55
7.4.250.0000.00816.46
7.4.240.0030.00516.53
7.4.230.0070.00016.49
7.4.220.0070.01116.44
7.4.210.0070.01416.60
7.4.200.0040.00416.59
7.4.160.0060.01016.49
7.4.150.0120.01217.40
7.4.140.0090.00917.86
7.4.130.0070.01016.35
7.4.120.0100.01116.55
7.4.110.0070.01116.59
7.4.100.0130.01016.52
7.4.90.0100.00616.61
7.4.80.0150.00719.39
7.4.70.0120.00916.51
7.4.60.0090.00916.59
7.4.50.0040.01116.50
7.4.40.0130.00316.65
7.4.30.0090.00616.64
7.4.10.0070.01114.94
7.4.00.0040.01514.97
7.3.330.0030.00313.36
7.3.320.0000.00513.29
7.3.310.0030.00316.37
7.3.300.0000.00716.27
7.3.290.0110.00516.38
7.3.280.0080.00916.35
7.3.270.0140.00317.40
7.3.260.0080.01116.42
7.3.250.0100.00916.33
7.3.240.0090.01016.50
7.3.230.0030.01716.38
7.3.210.0170.00316.58
7.3.200.0040.01616.42
7.3.190.0120.00916.30
7.3.180.0090.01216.36
7.3.170.0120.00316.41
7.3.160.0030.01416.63
7.3.130.0030.01414.70
7.3.120.0070.01015.05
7.3.110.0080.00614.51
7.3.100.0110.00314.79
7.3.90.0000.01514.73
7.3.80.0170.00014.82
7.3.70.0030.01414.66
7.3.60.0030.01014.83
7.3.50.0030.00614.89
7.3.40.0070.00414.65
7.3.30.0030.01314.94
7.3.20.0000.01616.39
7.3.10.0170.00016.61
7.3.00.0040.00816.62
7.2.330.0090.00916.69
7.2.320.0060.01316.76
7.2.310.0090.00916.37
7.2.300.0130.00316.64
7.2.290.0110.01116.72
7.2.260.0030.01614.85
7.2.250.0070.01114.96
7.2.240.0070.00715.04
7.2.230.0060.00915.23
7.2.220.0070.00715.20
7.2.210.0030.01415.05
7.2.200.0030.01014.94
7.2.190.0110.00314.95
7.2.180.0070.00415.07
7.2.170.0050.00514.84
7.2.160.0060.00915.10
7.2.150.0000.01416.71
7.2.140.0040.01416.89
7.2.130.0060.00916.70
7.2.120.0040.00816.66
7.2.110.0040.00817.06
7.2.100.0060.00616.87
7.2.90.0100.00617.09
7.2.80.0040.00716.73
7.2.70.0030.01016.85
7.2.60.0090.00516.85
7.2.50.0070.00716.82
7.2.40.0030.00616.58
7.2.30.0030.00616.61
7.2.20.0070.00716.79
7.2.10.0000.01416.92
7.2.00.0030.00916.62
7.1.330.0060.00615.91
7.1.320.0090.00315.71
7.1.310.0100.00715.80
7.1.300.0000.01215.73
7.1.290.0080.00015.75
7.1.280.0050.00415.39
7.1.270.0040.01115.60
7.1.260.0030.01315.36
7.1.250.0030.00715.82
7.1.240.0040.00815.80
7.1.230.0000.01415.67
7.1.220.0070.00315.63
7.1.210.0070.00315.79
7.1.200.0030.01015.81
7.1.190.0030.01015.63
7.1.180.0030.01315.68
7.1.170.0060.00315.39
7.1.160.0040.00415.68
7.1.150.0100.00315.59
7.1.140.0070.01015.75
7.1.130.0070.00715.77
7.1.120.0000.01515.50
7.1.110.0040.00815.41
7.1.100.0470.00815.79
7.1.90.0940.00815.79
7.1.80.0950.00915.71
7.1.70.0610.00615.47
7.1.60.1010.00524.34
7.1.50.0980.01424.28
7.1.40.0850.01223.92
7.1.30.0900.01024.05
7.1.20.0960.00724.19
7.1.10.0830.01215.25
7.1.00.0580.01315.21
7.0.330.0000.01215.15
7.0.320.0060.00915.07
7.0.310.0040.00714.94
7.0.300.0100.00715.36
7.0.290.0000.01015.44
7.0.280.0080.00515.48
7.0.270.0030.01315.32
7.0.260.0060.00615.36
7.0.250.0060.00815.31
7.0.240.0440.00715.42
7.0.230.0880.00715.65
7.0.220.0810.01015.23
7.0.210.0410.00814.88
7.0.200.0850.01114.99
7.0.190.0990.00815.17
7.0.180.0810.00814.84
7.0.170.1050.01014.87
7.0.160.0820.01215.00
7.0.150.0930.00514.87
7.0.140.0710.01214.88
7.0.130.0640.00914.96
7.0.120.0800.00814.88
7.0.110.0760.00714.95
7.0.100.0900.00514.84
7.0.90.0750.01014.99
7.0.80.0710.00814.97
7.0.70.0860.00714.86
7.0.60.0740.00314.86
7.0.50.0960.00715.02
7.0.40.0590.01113.80
7.0.30.0760.00614.06
7.0.20.0560.01113.91
7.0.10.1150.00813.91
7.0.00.0700.00913.89
5.6.400.0100.00013.96
5.6.390.0000.00914.16
5.6.380.0060.00314.33
5.6.370.0060.00614.11
5.6.360.0030.00914.20
5.6.350.0100.00314.32
5.6.340.0060.00914.03
5.6.330.0070.00714.32
5.6.320.0080.00814.23
5.6.310.0040.00714.24
5.6.300.0040.00414.22
5.6.290.0000.01413.96
5.6.280.0070.00714.02
5.6.270.0040.01114.02
5.6.260.0080.00413.87
5.6.250.0030.01014.23
5.6.240.0060.00314.25
5.6.230.0050.00514.27
5.6.220.0140.00014.13
5.6.210.0040.01114.30
5.6.200.0070.01014.13
5.6.190.0120.00613.80
5.6.180.0060.00614.13
5.6.170.0120.00314.06
5.6.160.0090.00914.15
5.6.150.0060.00314.21
5.6.140.0080.00814.05
5.6.130.0000.01614.25
5.6.120.0000.01214.22
5.6.110.0030.00614.10
5.6.100.0080.00414.11
5.6.90.0030.01413.98
5.6.80.0070.00714.26
5.6.70.0120.00314.12
5.6.60.0120.00313.79
5.6.50.0100.00314.17
5.6.40.0030.01014.14
5.6.30.0070.00714.29
5.6.20.0030.00914.04
5.6.10.0000.01714.03
5.6.00.0070.00314.08

preferences:
31.74 ms | 403 KiB | 5 Q