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); } } $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.0060.00916.63
8.3.50.0140.00016.25
8.3.40.0070.01118.48
8.3.30.0160.00318.45
8.3.20.0070.00020.04
8.3.10.0000.00821.82
8.3.00.0050.00317.47
8.2.180.0030.01016.75
8.2.170.0070.00722.96
8.2.160.0030.01020.35
8.2.150.0000.00824.18
8.2.140.0030.01024.66
8.2.130.0040.00421.04
8.2.120.0080.00026.35
8.2.110.0110.00020.43
8.2.100.0080.00317.84
8.2.90.0040.00419.13
8.2.80.0040.00417.97
8.2.70.0050.00517.25
8.2.60.0000.00817.93
8.2.50.0040.00418.10
8.2.40.0030.00522.38
8.2.30.0000.00719.23
8.2.20.0080.00017.92
8.2.10.0040.00417.97
8.2.00.0040.00418.00
8.1.280.0040.01425.92
8.1.270.0000.00823.85
8.1.260.0100.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00722.18
8.1.230.0080.00417.42
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0030.00617.23
8.1.180.0040.00418.10
8.1.170.0040.00418.43
8.1.160.0040.00418.91
8.1.150.0000.00720.53
8.1.140.0050.00319.46
8.1.130.0050.00318.72
8.1.120.0020.00517.32
8.1.110.0030.00617.39
8.1.100.0040.00417.43
8.1.90.0000.00717.36
8.1.80.0050.00317.31
8.1.70.0030.00317.27
8.1.60.0000.00817.52
8.1.50.0050.00217.51
8.1.40.0040.00417.36
8.1.30.0040.00417.56
8.1.20.0000.00817.57
8.1.10.0040.00417.35
8.1.00.0050.00317.20
8.0.300.0020.00518.77
8.0.290.0020.00516.75
8.0.280.0030.00518.38
8.0.270.0000.00717.25
8.0.260.0040.00416.86
8.0.250.0030.00316.83
8.0.240.0040.00416.98
8.0.230.0070.00316.96
8.0.220.0040.00416.87
8.0.210.0070.00016.86
8.0.200.0030.00316.90
8.0.190.0080.00016.95
8.0.180.0030.00716.93
8.0.170.0030.00516.91
8.0.160.0040.00416.88
8.0.150.0030.00516.71
8.0.140.0040.00416.88
8.0.130.0030.00313.31
8.0.120.0040.00416.71
8.0.110.0000.00716.91
8.0.100.0070.00016.91
8.0.90.0070.00016.84
8.0.80.0160.00616.81
8.0.70.0000.00816.82
8.0.60.0040.00416.77
8.0.50.0040.00416.88
8.0.30.0100.00617.03
8.0.20.0140.01117.40
8.0.10.0040.00416.82
8.0.00.0120.00916.91
7.4.330.0050.00015.55
7.4.320.0060.00016.54
7.4.300.0030.00316.39
7.4.290.0060.00316.32
7.4.280.0040.00416.57
7.4.270.0000.00616.43
7.4.260.0030.00313.22
7.4.250.0080.00016.40
7.4.240.0070.00016.59
7.4.230.0040.00416.43
7.4.220.0130.00916.28
7.4.210.0130.00416.51
7.4.200.0070.00016.48
7.4.160.0120.00616.42
7.4.150.0060.01217.40
7.4.140.0040.01417.86
7.4.130.0090.01516.39
7.4.120.0070.01316.37
7.4.110.0130.00316.31
7.4.100.0090.00916.62
7.4.90.0130.00416.42
7.4.80.0000.02319.39
7.4.70.0030.01316.44
7.4.60.0100.00716.45
7.4.50.0130.00316.34
7.4.40.0040.01216.56
7.4.30.0130.00316.56
7.4.00.0040.00714.86
7.3.330.0050.00013.28
7.3.320.0000.00513.10
7.3.310.0030.00316.20
7.3.300.0060.00016.12
7.3.290.0060.00016.13
7.3.280.0070.01016.22
7.3.270.0070.01017.40
7.3.260.0080.00816.45
7.3.250.0140.00816.40
7.3.240.0050.01316.37
7.3.230.0060.01116.52
7.3.210.0060.01216.23
7.3.200.0030.01416.25
7.3.190.0070.01016.52
7.3.180.0110.00816.43
7.3.170.0160.00016.30
7.3.160.0090.00616.22
7.3.00.0000.01516.70
7.2.330.0100.00716.57
7.2.320.0090.00816.60
7.2.310.0120.00616.23
7.2.300.0100.00716.55
7.2.290.0100.00616.65
7.2.130.0100.00716.61
7.2.120.0000.01116.51
7.2.110.0000.01216.51
7.2.100.0060.00616.62
7.2.90.0100.01016.85
7.2.80.0090.00316.87
7.2.70.0040.00816.80
7.2.60.0030.00916.61
7.2.50.0000.01016.53
7.2.40.0080.00316.75
7.2.30.0040.00716.37
7.2.20.0060.00616.66
7.2.10.0060.00616.77
7.2.00.0070.00717.97
7.1.250.0030.01015.62
7.1.240.0070.00715.77
7.1.230.0030.01015.72
7.1.220.0040.00915.64
7.1.210.0030.01315.56
7.1.200.0100.00515.56
7.1.190.0030.01015.59
7.1.180.0070.00415.75
7.1.170.0000.00815.49
7.1.160.0000.01015.67
7.1.150.0070.00315.59
7.1.140.0030.00715.82
7.1.130.0140.00015.30
7.1.120.0040.00415.53
7.1.110.0000.01115.79
7.1.100.0070.00616.51
7.1.90.0040.01115.60
7.1.80.0070.01015.57
7.1.70.0060.00416.43
7.1.60.0120.01025.19
7.1.50.0100.00925.03
7.1.40.0120.00824.97
7.1.30.0140.00524.96
7.1.20.0100.00625.02
7.1.10.0100.00315.96
7.1.00.0060.00616.00
7.0.330.0070.00015.02
7.0.320.0000.00815.37
7.0.310.0090.00615.36
7.0.300.0030.00615.35
7.0.290.0030.00615.27
7.0.280.0080.00415.26
7.0.270.0000.00915.28
7.0.260.0060.00915.30
7.0.250.0000.01415.11
7.0.240.0090.00315.43
7.0.230.0030.00715.26
7.0.220.0030.01015.52
7.0.210.0040.00815.18
7.0.200.0050.00716.01
7.0.190.0060.00815.95
7.0.180.0050.00815.62
7.0.170.0060.00515.64
7.0.160.0050.00815.65
7.0.150.0080.00415.62
7.0.140.0020.01015.82
7.0.130.0030.00915.81
7.0.120.0020.01015.96
7.0.110.0030.00815.77
7.0.100.0080.00515.84
7.0.90.0040.00615.75
7.0.80.0080.00715.87
7.0.70.0030.00815.70
7.0.60.0040.00615.63
7.0.50.0050.00715.77
7.0.40.0050.00814.69
7.0.30.0040.00714.81
7.0.20.0040.00714.66
7.0.10.0050.00814.73
7.0.00.0050.00614.63
5.6.380.0120.00014.08

preferences:
41.28 ms | 400 KiB | 5 Q