3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Comparable { abstract public function isGreaterThan($other); public function isLesserThan($other) { return $other->isGreaterThan($this); } public function equals($other) { return !($this->isGreaterThan($other) || $this->isLesserThan($other)); } } class SimpleInt { use Comparable; private $value; public function __construct($value) { $this->value = $value; } public function isGreaterThan($other) { return $this->value > $other->value; } } $i = new SimpleInt(10); echo (int)($i->equals($i));

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.50
8.3.50.0100.00717.37
8.3.40.0040.01218.58
8.3.30.0120.00318.67
8.3.20.0040.00418.64
8.3.10.0040.00420.38
8.3.00.0060.00319.38
8.2.180.0070.01116.38
8.2.170.0130.00618.79
8.2.160.0120.00322.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00019.11
8.2.110.0030.00620.93
8.2.100.0110.00017.78
8.2.90.0040.00419.34
8.2.80.0060.00319.38
8.2.70.0040.00417.50
8.2.60.0040.00417.80
8.2.50.0000.00918.07
8.2.40.0050.00318.09
8.2.30.0060.00318.07
8.2.20.0000.00717.68
8.2.10.0040.00417.59
8.2.00.0000.00817.68
8.1.280.0110.00425.92
8.1.270.0100.00724.66
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0090.00022.41
8.1.230.0100.00320.91
8.1.220.0080.00017.74
8.1.210.0000.00818.97
8.1.200.0030.00617.35
8.1.190.0060.00317.43
8.1.180.0060.00318.10
8.1.170.0060.00318.82
8.1.160.0000.00718.83
8.1.150.0030.00518.60
8.1.140.0040.00417.32
8.1.130.0040.00417.81
8.1.120.0000.00717.48
8.1.110.0000.00817.36
8.1.100.0080.00017.41
8.1.90.0000.00717.41
8.1.80.0040.00417.37
8.1.70.0000.00717.43
8.1.60.0000.00817.59
8.1.50.0000.00817.46
8.1.40.0040.00417.46
8.1.30.0000.00717.62
8.1.20.0030.00617.64
8.1.10.0000.00817.53
8.1.00.0040.00417.52
8.0.300.0040.00419.61
8.0.290.0000.00716.63
8.0.280.0050.00318.36
8.0.270.0030.00317.25
8.0.260.0000.00816.73
8.0.250.0000.00716.87
8.0.240.0040.00416.84
8.0.230.0030.00316.92
8.0.220.0000.00716.89
8.0.210.0000.00716.88
8.0.200.0000.00616.96
8.0.190.0040.00416.83
8.0.180.0000.00816.88
8.0.170.0030.00616.81
8.0.160.0050.00217.00
8.0.150.0030.00616.72
8.0.140.0000.00816.88
8.0.130.0030.00313.35
8.0.120.0040.00416.92
8.0.110.0000.00716.67
8.0.100.0000.00716.70
8.0.90.0040.00416.83
8.0.80.0090.00616.84
8.0.70.0000.00716.71
8.0.60.0040.00416.95
8.0.50.0050.00216.84
8.0.30.0170.00517.02
8.0.20.0100.01316.97
8.0.10.0040.00416.95
8.0.00.0110.00816.79
7.4.330.0000.00512.97
7.4.320.0000.00616.49
7.4.300.0030.00316.59
7.4.290.0030.00316.66
7.4.280.0080.00016.65
7.4.270.0070.00016.59
7.4.260.0000.00513.39
7.4.250.0040.00416.48
7.4.240.0050.00316.57
7.4.230.0070.00016.34
7.4.220.0140.00416.50
7.4.210.0030.01216.54
7.4.200.0040.00416.34
7.4.190.0040.00416.76
7.4.160.0060.00916.53
7.4.150.0100.00616.30
7.4.140.0080.01416.54
7.4.130.0060.01116.43
7.4.120.0140.00416.53
7.4.110.0120.00616.44
7.4.100.0140.00416.46
7.4.90.0120.01516.58
7.4.80.0070.01416.61
7.4.70.0060.01316.51
7.4.60.0100.01216.47
7.4.50.0030.00616.45
7.4.40.0000.01616.60
7.4.30.0060.01016.54
7.4.00.0070.01014.98
7.3.330.0060.00013.13
7.3.320.0030.00313.13
7.3.310.0050.00216.32
7.3.300.0060.00016.29
7.3.290.0100.01016.31
7.3.280.0090.00916.35
7.3.270.0140.01016.34
7.3.260.0080.01416.42
7.3.250.0090.00816.48
7.3.240.0060.00916.35
7.3.230.0160.00616.20
7.3.210.0090.00616.52
7.3.200.0100.01019.39
7.3.190.0110.00916.31
7.3.180.0110.00616.44
7.3.170.0060.00916.59
7.3.160.0060.01016.43
7.3.120.0090.00614.59
7.2.330.0110.00716.50
7.2.320.0160.00716.56
7.2.310.0000.02216.57
7.2.300.0140.00316.73
7.2.290.0060.01116.61
7.2.00.0060.00919.38
7.1.200.0120.00415.19
7.1.100.0060.00618.38
7.1.70.0000.00717.19
7.1.60.0040.02119.40
7.1.50.0100.01317.13
7.1.00.0030.07022.28
7.0.200.0030.00516.41
7.0.140.0030.07322.21
7.0.120.0030.07321.95
7.0.60.0100.05720.05
7.0.50.0170.03017.90
7.0.40.0100.03720.19
7.0.30.0230.08320.34
7.0.20.0330.07720.08
7.0.10.0070.04320.05
7.0.00.0030.05320.14
5.6.210.0030.08320.65
5.6.200.0070.03718.16
5.6.190.0070.06720.39
5.6.180.0170.03720.63
5.6.170.0270.05020.48
5.6.160.0030.04020.71
5.6.150.0000.04018.25
5.6.140.0070.08018.14
5.6.130.0170.07718.13
5.6.120.0030.05020.84
5.6.110.0130.08321.02
5.6.100.0230.03720.98
5.6.90.0000.07721.00
5.6.80.0170.05320.40
5.5.350.0030.08320.47
5.5.340.0000.05017.93
5.5.330.0100.05020.56
5.5.320.3070.04320.24
5.5.310.0300.05320.34
5.5.300.0070.03717.98
5.5.290.0070.09017.98
5.5.280.0030.05720.78
5.5.270.0030.05320.79
5.5.260.0130.08020.85
5.5.250.0070.06020.69
5.5.240.0230.06020.20
5.4.450.0730.05019.46
5.4.440.0270.04019.26
5.4.430.0630.03019.28
5.4.420.0530.03319.54
5.4.410.0370.04719.42
5.4.400.0500.04019.22
5.4.390.0530.04019.02
5.4.380.0400.04019.06
5.4.370.0670.03019.23
5.4.360.0700.03019.20
5.4.350.0700.03018.96
5.4.340.0470.04719.07
5.4.320.0870.03018.85
5.4.310.0900.03019.04
5.4.300.0370.05019.05
5.4.290.0500.04318.96
5.4.280.0530.03019.16
5.4.270.0670.04319.05
5.4.260.0900.03719.03
5.4.250.0300.03719.21
5.4.240.0600.05719.30
5.4.230.0670.04019.21
5.4.220.0470.04319.22
5.4.210.0730.04319.19
5.4.200.0500.02719.18
5.4.190.0730.03019.12
5.4.180.0400.04319.04
5.4.170.0670.03019.03
5.4.160.0670.03019.20
5.4.150.0800.03319.02
5.4.140.0400.04716.38
5.4.130.0800.03016.66
5.4.120.0930.03316.33
5.4.110.0500.03716.28
5.4.100.0570.03016.60
5.4.90.0330.03716.50
5.4.80.0370.04016.38
5.4.70.0500.03016.57
5.4.60.0570.03716.41
5.4.50.0000.03016.21
5.4.40.0530.04316.53
5.4.30.0700.03316.42
5.4.20.0900.02716.50
5.4.10.0870.02716.15
5.4.00.0600.03715.89
5.3.290.0570.03315.64
5.3.280.0330.03715.64
5.3.270.0730.04315.64
5.3.260.0770.03715.64
5.3.250.0830.03715.64
5.3.240.0500.04715.64
5.3.230.0600.04015.64
5.3.220.0400.04015.64
5.3.210.0530.04315.64
5.3.200.0470.05315.64
5.3.190.0600.03715.64
5.3.180.0630.03715.64
5.3.170.0770.03315.64
5.3.160.0870.03715.64
5.3.150.0770.03315.64
5.3.140.0700.03015.64
5.3.130.0970.03015.64
5.3.120.0770.03715.64
5.3.110.0900.02315.64
5.3.100.1000.03715.64
5.3.90.0570.04015.64
5.3.80.0330.04315.64
5.3.70.0870.03015.64
5.3.60.0730.04015.64
5.3.50.0570.03715.64
5.3.40.0870.04715.64
5.3.30.0470.03715.64
5.3.20.0870.03315.64
5.3.10.0370.04715.64
5.3.00.0530.03715.64
5.2.170.0400.03015.64
5.2.160.0470.02315.64
5.2.150.0400.03315.64
5.2.140.0500.03015.64
5.2.130.0470.03015.64
5.2.120.0570.06015.64
5.2.110.0500.02715.64
5.2.100.0330.03015.64
5.2.90.0400.03015.64
5.2.80.0400.02315.64
5.2.70.0600.02015.64
5.2.60.0570.03715.64
5.2.50.0530.02715.64
5.2.40.0500.02715.64
5.2.30.0370.03715.64
5.2.20.0630.02715.64
5.2.10.0500.02315.64
5.2.00.0330.03715.64
5.1.60.0670.02315.93
5.1.50.0200.02315.93
5.1.40.0100.03015.93
5.1.30.0530.02315.93
5.1.20.0070.01715.93
5.1.10.0330.02715.93
5.1.00.0170.02715.93
5.0.50.0100.02315.93
5.0.40.0200.02715.93
5.0.30.0000.03715.93
5.0.20.0100.02015.93
5.0.10.0200.02015.93
5.0.00.0300.03315.93
4.4.90.0170.00715.64
4.4.80.0130.01715.64
4.4.70.0170.02015.64
4.4.60.0300.01015.64
4.4.50.0070.01715.64
4.4.40.0170.02715.93
4.4.30.0100.01015.93
4.4.20.0300.01015.93
4.4.10.0270.01315.93
4.4.00.0130.02715.93
4.3.110.0130.03015.93
4.3.100.0330.01315.93
4.3.90.0200.01015.93
4.3.80.0200.02315.93
4.3.70.0130.01015.93
4.3.60.0200.02015.93
4.3.50.0070.02015.93
4.3.40.0170.02015.93
4.3.30.0130.01315.93
4.3.20.0070.01715.93
4.3.10.0030.01315.93
4.3.00.0030.01715.93

preferences:
40.84 ms | 401 KiB | 5 Q