3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Adder { public function calculate(int $x, int $y) { echo $x + $y; } } trait Subtractor { public function calculate(int $x, int $y) { echo $x - $y; } } class StupidCalc { use Adder { calculate as public add; } use Subtractor { calculate as public sub; } function maybeAdd(int $x, int $y) { $this->add($x, $y); } function maybeSub(int $x, int $y) { $this->sub($x, $y); } function calculate(int $x, int $y) {} } $calc = new StupidCalc(); $calc->maybeAdd(3, 2); $calc->maybeSub(3, 2);

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.00316.50
8.3.50.0070.00716.27
8.3.40.0120.00618.64
8.3.30.0140.00018.76
8.3.20.0000.00720.34
8.3.10.0040.00421.87
8.3.00.0050.00317.78
8.2.180.0100.01016.50
8.2.170.0110.01122.96
8.2.160.0130.00020.45
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00421.04
8.2.120.0080.00026.35
8.2.110.0030.00620.52
8.2.100.0040.00817.78
8.2.90.0040.00419.09
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0040.00417.91
8.2.50.0060.00318.10
8.2.40.0050.00322.23
8.2.30.0040.00419.19
8.2.20.0000.00917.88
8.2.10.0000.00817.99
8.2.00.0040.00417.87
8.1.280.0100.00725.92
8.1.270.0040.00423.83
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0080.00024.02
8.1.230.0070.00419.15
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0040.00417.23
8.1.190.0000.00917.10
8.1.180.0000.00818.10
8.1.170.0000.00818.50
8.1.160.0000.00718.86
8.1.150.0040.00420.57
8.1.140.0040.00419.43
8.1.130.0040.00418.87
8.1.120.0000.00717.44
8.1.110.0050.00517.40
8.1.100.0000.00817.47
8.1.90.0030.00517.25
8.1.80.0000.00717.37
8.1.70.0040.00417.29
8.1.60.0030.00517.50
8.1.50.0000.00717.29
8.1.40.0060.00317.43
8.1.30.0000.00817.59
8.1.20.0070.00017.50
8.1.10.0060.00317.34
8.1.00.0040.00417.32
8.0.300.0030.00618.77
8.0.290.0040.00416.63
8.0.280.0000.00718.34
8.0.270.0070.00017.19
8.0.260.0030.00316.74
8.0.250.0040.00416.97
8.0.240.0050.00316.95
8.0.230.0060.00316.95
8.0.220.0080.00016.91
8.0.210.0030.00316.92
8.0.200.0030.00317.02
8.0.190.0040.00417.00
8.0.180.0030.00716.94
8.0.170.0000.00716.95
8.0.160.0030.00516.87
8.0.150.0070.00016.88
8.0.140.0040.00416.91
8.0.130.0060.00013.32
8.0.120.0040.00416.83
8.0.110.0000.00716.88
8.0.100.0070.00016.95
8.0.90.0000.00716.93
8.0.80.0150.00616.92
8.0.70.0000.00716.73
8.0.60.0040.00416.81
8.0.50.0070.00016.84
8.0.30.0080.01217.03
8.0.20.0090.01117.40
8.0.10.0040.00416.97
8.0.00.0100.00716.63
7.4.330.0020.00215.55
7.4.320.0030.00316.58
7.4.300.0070.00016.50
7.4.290.0070.00016.52
7.4.280.0080.00016.43
7.4.270.0000.00716.53
7.4.260.0000.00613.25
7.4.250.0030.00316.39
7.4.240.0000.00716.62
7.4.230.0070.00016.50
7.4.220.0090.01116.66
7.4.210.0120.00816.53
7.4.200.0030.00316.61
7.4.160.0080.00816.47
7.4.150.0140.01017.40
7.4.140.0110.01117.86
7.4.130.0120.00816.72
7.4.120.0100.00916.41
7.4.110.0130.00316.50
7.4.100.0140.00316.48
7.4.90.0080.00816.44
7.4.80.0070.01019.39
7.4.70.0150.00316.56
7.4.60.0080.00816.39
7.4.50.0070.01116.58
7.4.40.0000.01616.41
7.4.30.0030.01316.59
7.4.00.0070.00714.89
7.3.330.0000.00513.11
7.3.320.0030.00313.02
7.3.310.0000.00716.11
7.3.300.0000.00716.20
7.3.290.0030.00316.11
7.3.280.0100.00716.22
7.3.270.0120.00417.40
7.3.260.0100.00616.57
7.3.250.0090.01116.33
7.3.240.0060.01116.44
7.3.230.0090.00916.50
7.3.210.0120.00916.35
7.3.200.0110.01116.59
7.3.190.0130.00316.62
7.3.180.0100.00616.39
7.3.170.0070.01416.44
7.3.160.0090.00616.32
7.3.120.0050.01014.77
7.3.110.0080.00714.48
7.3.100.0040.01114.81
7.3.90.0060.00614.63
7.3.80.0030.01014.82
7.3.70.0080.00414.73
7.3.60.0070.00514.78
7.3.50.0090.00214.84
7.3.40.0000.01214.76
7.3.30.0100.00314.65
7.3.20.0080.00516.74
7.3.10.0000.01016.65
7.3.00.0030.00716.53
7.2.330.0070.01016.78
7.2.320.0140.00316.81
7.2.310.0100.00716.70
7.2.300.0100.00716.75
7.2.290.0070.01116.58
7.2.250.0070.01114.94
7.2.240.0060.00814.80
7.2.230.0060.00814.88
7.2.220.0100.00515.02
7.2.210.0080.00515.01
7.2.200.0050.01115.13
7.2.190.0070.00614.90
7.2.180.0070.00715.06
7.2.170.0070.00515.02
7.2.160.0110.00314.92
7.2.150.0040.00816.81
7.2.140.0020.01316.82
7.2.130.0080.00816.84
7.2.120.0070.00516.99
7.2.110.0090.00517.00
7.2.100.0050.01116.86
7.2.90.0300.00616.28
7.2.80.0250.00716.15
7.2.70.0140.01016.20
7.2.60.0090.00916.16
7.2.50.0100.00816.33
7.2.40.0080.00816.18
7.2.30.0200.00816.12
7.2.20.0630.00816.15
7.2.10.0590.01116.32
7.2.00.0450.00716.19
7.1.330.0060.00615.66
7.1.320.0020.01115.90
7.1.310.0070.00515.66
7.1.300.0060.00615.86
7.1.290.0030.00915.85
7.1.280.0060.00815.80
7.1.270.0130.00015.58
7.1.260.0030.01215.82
7.1.250.0050.00915.59
7.1.240.0080.00515.77
7.1.230.0000.01515.89
7.1.220.0030.01015.66
7.1.210.1040.00914.76
7.1.200.0080.01114.72
7.1.190.0030.01314.85
7.1.180.0260.00514.76
7.1.170.0160.00214.69
7.1.160.0100.00514.64
7.1.150.0070.01314.92
7.1.140.0740.00814.48
7.1.130.0630.00614.88
7.1.120.0600.00814.77
7.1.110.0590.00814.71
7.1.100.0610.00514.73
7.1.90.0640.00814.72
7.1.80.0640.01014.73
7.1.70.0450.00714.68
7.1.60.0210.01223.80
7.1.50.1330.00823.68
7.1.40.0180.01123.89
7.1.30.1130.00823.80
7.1.20.0460.01223.69
7.1.10.1220.01214.94
7.1.00.0790.00814.64
7.0.330.0090.00615.37
7.0.320.0080.00315.30
7.0.310.0260.00614.18
7.0.300.0100.00714.45
7.0.290.0180.00814.40
7.0.280.0970.00514.31
7.0.270.0680.00514.40
7.0.260.0560.00814.22
7.0.250.0570.01014.31
7.0.240.0640.00714.38
7.0.230.0540.00614.52
7.0.220.0700.00614.56
7.0.210.0730.00314.54
7.0.200.0210.00514.40
7.0.190.0260.00714.36
7.0.180.0080.00714.44
7.0.170.0470.00714.37
7.0.160.0580.00414.33
7.0.150.0170.01014.45
7.0.140.0170.00514.42
7.0.130.0590.00614.50
7.0.120.0120.00314.45
7.0.110.0610.00814.54
7.0.100.0090.00514.44
7.0.90.0420.00914.52
7.0.80.0080.00414.46
7.0.70.0930.00314.29
7.0.60.1120.00514.66
7.0.50.1210.00614.50
7.0.40.1070.00713.84
7.0.30.0830.00813.77
7.0.20.0080.00713.83
7.0.10.1280.00813.82
7.0.00.1500.01013.95
5.6.400.0030.01014.14
5.6.390.0130.00314.46
5.6.380.0100.00014.44
5.6.370.0040.00714.31
5.6.360.0040.00814.28
5.6.350.0000.00914.46
5.6.340.0090.00914.14
5.6.330.0050.00514.36
5.6.320.0000.01314.40
5.6.310.0080.00314.23
5.6.300.0070.00714.10
5.6.290.0070.00414.50
5.6.280.0090.00614.67
5.6.270.0090.00614.27
5.6.260.0030.01014.65
5.6.250.0100.00314.57
5.6.240.0060.00314.12
5.6.230.0040.00414.42
5.6.220.0040.00714.46
5.6.210.0030.00614.51
5.6.200.0040.00414.17
5.6.190.0000.01014.13
5.6.180.0030.00914.11
5.6.170.0070.00714.32
5.6.160.0080.00414.22
5.6.150.0070.01114.44
5.6.140.0060.00914.40
5.6.130.0070.00714.41
5.6.120.0070.00714.19
5.6.110.0000.01214.42
5.6.100.0030.00714.11
5.6.90.0030.00914.21
5.6.80.0080.00314.33
5.6.70.0080.00314.34
5.6.60.0030.01014.28
5.6.50.0030.01014.10
5.6.40.0040.00714.22
5.6.30.0100.00014.10
5.6.20.0050.00314.31
5.6.10.0030.01114.12
5.6.00.0030.00714.27

preferences:
73.8 ms | 401 KiB | 5 Q