3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Adder { public function calculate(int $x, int $y) { return $x + $y; } } trait Subtractor { public function calculate(int $x, int $y) { return $x - $y; } } class StupidCalc { use Adder { calculate as public add; } use Subtractor { calculate as public sub; } function maybeAdd(int $x, int $y) { return $this->add($x, $y); } function maybeSub(int $x, int $y) { return $this->sub($x, $y); } } $calc = new StupidCalc(); echo $calc->maybeAdd(3, 2); echo $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.86
8.3.50.0110.00416.46
8.3.40.0040.01518.48
8.3.30.0120.00318.72
8.3.20.0000.00720.15
8.3.10.0050.00321.76
8.3.00.0080.00017.72
8.2.180.0110.00416.63
8.2.170.0070.00722.96
8.2.160.0100.00320.34
8.2.150.0080.00024.18
8.2.140.0070.00724.66
8.2.130.0040.00421.13
8.2.120.0060.00326.35
8.2.110.0000.00920.97
8.2.100.0040.00717.97
8.2.90.0050.00318.89
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0030.00517.93
8.2.50.0060.00318.10
8.2.40.0040.00422.36
8.2.30.0030.00519.06
8.2.20.0000.00717.99
8.2.10.0070.00018.00
8.2.00.0000.00718.05
8.1.280.0100.01025.92
8.1.270.0040.00423.70
8.1.260.0040.01126.35
8.1.250.0040.00428.09
8.1.240.0070.00323.79
8.1.230.0110.00019.01
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0050.00517.23
8.1.190.0100.00317.10
8.1.180.0060.00318.10
8.1.170.0050.00318.66
8.1.160.0050.00218.87
8.1.150.0070.00020.64
8.1.140.0000.00719.45
8.1.130.0100.00018.79
8.1.120.0070.00017.36
8.1.110.0070.00317.43
8.1.100.0000.00717.40
8.1.90.0050.00317.38
8.1.80.0040.00417.42
8.1.70.0070.00017.27
8.1.60.0060.00317.41
8.1.50.0000.00817.44
8.1.40.0000.00717.45
8.1.30.0040.00417.52
8.1.20.0050.00317.53
8.1.10.0000.00817.41
8.1.00.0040.00417.19
8.0.300.0030.00618.77
8.0.290.0070.00016.75
8.0.280.0030.00318.38
8.0.270.0070.00017.18
8.0.260.0000.00616.81
8.0.250.0060.00016.96
8.0.240.0000.00716.95
8.0.230.0060.00316.80
8.0.220.0030.00316.86
8.0.210.0030.00316.74
8.0.200.0030.00316.94
8.0.190.0060.00316.91
8.0.180.0040.00516.91
8.0.170.0000.00816.84
8.0.160.0040.00416.99
8.0.150.0040.00416.80
8.0.140.0000.00816.85
8.0.130.0030.00313.39
8.0.120.0080.00016.86
8.0.110.0030.00316.70
8.0.100.0000.00716.71
8.0.90.0040.00416.69
8.0.80.0080.00816.89
8.0.70.0000.00916.79
8.0.60.0000.00716.82
8.0.50.0090.00016.87
8.0.30.0080.00817.05
8.0.20.0090.00917.40
8.0.10.0070.00016.89
8.0.00.0160.00316.71
7.4.330.0000.00515.55
7.4.320.0030.00316.46
7.4.300.0030.00316.36
7.4.290.0000.00916.43
7.4.280.0060.00316.52
7.4.270.0030.00516.59
7.4.260.0050.00013.24
7.4.250.0000.00816.33
7.4.240.0000.00816.39
7.4.230.0040.00416.28
7.4.220.0070.01116.37
7.4.210.0100.00816.43
7.4.200.0030.00316.52
7.4.160.0070.01216.51
7.4.150.0170.00017.40
7.4.140.0070.01117.86
7.4.130.0140.00316.58
7.4.120.0090.01316.54
7.4.110.0100.01016.51
7.4.100.0060.01016.31
7.4.90.0140.00416.53
7.4.80.0070.01019.39
7.4.70.0090.00616.54
7.4.60.0050.01116.21
7.4.50.0060.00616.30
7.4.40.0030.01316.50
7.4.30.0070.01016.65
7.4.00.0070.01014.87
7.3.330.0030.00313.21
7.3.320.0050.00013.24
7.3.310.0030.00316.13
7.3.300.0060.00016.25
7.3.290.0000.00716.10
7.3.280.0080.01016.22
7.3.270.0000.01617.40
7.3.260.0080.00916.36
7.3.250.0090.01216.34
7.3.240.0100.01016.44
7.3.230.0060.01016.43
7.3.210.0080.00816.34
7.3.200.0110.00616.40
7.3.190.0130.00316.37
7.3.180.0070.01016.54
7.3.170.0070.01316.39
7.3.160.0160.00416.44
7.3.10.0040.01116.55
7.3.00.0110.00316.60
7.2.330.0180.02816.36
7.2.320.0030.01916.48
7.2.310.0150.00316.38
7.2.300.0060.01116.57
7.2.290.0100.00616.62
7.2.130.0030.01016.79
7.2.120.0090.00616.91
7.2.110.0140.00016.63
7.2.100.0000.01316.79
7.2.90.0100.00915.70
7.2.80.1170.01215.80
7.2.70.0680.01015.70
7.2.60.0120.00315.76
7.2.50.0070.01015.82
7.2.40.0050.01316.00
7.2.30.0210.00915.62
7.2.20.0080.00815.88
7.2.10.0130.00615.72
7.2.00.1080.00815.85
7.1.250.0040.00815.64
7.1.210.0120.00613.90
7.1.200.1910.00713.46
7.1.190.1840.00713.82
7.1.180.0450.00313.93
7.1.170.0160.00313.66
7.1.160.0930.00613.96
7.1.150.0560.00713.80
7.1.140.0130.00313.71
7.1.130.0120.00313.59
7.1.120.1610.00313.61
7.1.110.0650.00613.61
7.1.100.1310.00313.99
7.1.90.0270.01014.02
7.1.80.0640.00413.66
7.1.70.0260.00413.47
7.1.60.0240.01531.78
7.1.50.1890.01931.46
7.1.40.2970.01031.72
7.1.30.4180.02331.75
7.1.20.3690.01031.85
7.1.10.1260.01013.78
7.1.00.0060.01013.68
7.0.310.1840.00713.61
7.0.300.0030.01513.27
7.0.290.0060.00613.35
7.0.280.1560.00713.36
7.0.270.0100.00713.30
7.0.260.0790.00613.31
7.0.250.0130.00013.29
7.0.240.0040.00913.39
7.0.230.0100.00513.33
7.0.220.0110.00713.56
7.0.210.0130.00713.42
7.0.200.0720.00413.38
7.0.190.3570.01013.34
7.0.180.2560.00713.35
7.0.170.0110.00813.20
7.0.160.4530.00713.32
7.0.150.1540.00713.67
7.0.140.0080.01213.52
7.0.130.0120.00413.65
7.0.120.0100.00713.21
7.0.110.3840.00013.49
7.0.100.2910.01013.50
7.0.90.1460.01013.52
7.0.80.1680.00313.62
7.0.70.2100.01013.45
7.0.60.2220.00313.24
7.0.50.1540.00613.61
7.0.40.1750.01013.50
7.0.30.2290.00313.46
7.0.20.1200.01013.62
7.0.10.1330.01013.55
7.0.00.1260.00013.29

preferences:
49.44 ms | 401 KiB | 5 Q