3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Cachable { public function getCacheTtl(): int; } abstract class AbstractCacheItem implements Cachable { private $config = []; public function getCacheTtl(): int { return $this->config['cache_ttl'] ?? defined('static::CACHE_TTL') ? constant('static::CACHE_TTL') : 60; } } class SomeCacheItemA extends AbstractCacheItem { public const CACHE_TTL = 61; } class SomeCacheItemB extends AbstractCacheItem { } $a = new SomeCacheItemA(); $b = new SomeCacheItemB(); var_dump($a->getCacheTtl(), $b->getCacheTtl());

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.0180.00416.75
8.3.50.0130.00318.17
8.3.40.0100.00718.70
8.3.30.0100.00718.90
8.3.20.0040.00420.20
8.3.10.0030.00621.92
8.3.00.0040.00423.61
8.2.180.0210.00016.50
8.2.170.0100.01022.96
8.2.160.0040.01120.39
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00820.22
8.2.120.0090.00326.35
8.2.110.0090.00020.38
8.2.100.0040.00817.91
8.2.90.0030.00519.25
8.2.80.0030.00617.97
8.2.70.0000.00917.75
8.2.60.0050.00318.16
8.2.50.0060.00318.16
8.2.40.0080.00022.21
8.2.30.0040.00419.31
8.2.20.0040.00418.05
8.2.10.0000.00718.19
8.2.00.0000.00818.13
8.1.280.0130.00325.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00722.46
8.1.230.0120.00022.68
8.1.220.0080.00017.74
8.1.210.0030.00618.77
8.1.200.0000.00917.23
8.1.190.0080.00017.23
8.1.180.0000.00820.25
8.1.170.0000.00818.54
8.1.160.0050.00318.82
8.1.150.0020.00520.15
8.1.140.0040.00417.64
8.1.130.0000.00819.11
8.1.120.0030.00317.38
8.1.110.0040.00417.45
8.1.100.0040.00417.49
8.1.90.0000.01017.36
8.1.80.0050.00317.50
8.1.70.0050.00317.50
8.1.60.0100.00017.58
8.1.50.0000.01217.52
8.1.40.0030.00517.52
8.1.30.0040.00417.68
8.1.20.0050.00317.55
8.1.10.0000.00817.50
8.1.00.0090.00017.59
8.0.300.0030.00518.77
8.0.290.0040.00416.63
8.0.280.0000.00718.53
8.0.270.0030.00517.28
8.0.260.0000.00618.38
8.0.250.0000.00716.89
8.0.240.0040.00416.84
8.0.230.0040.00416.86
8.0.220.0000.00716.85
8.0.210.0000.00716.95
8.0.200.0080.00016.96
8.0.190.0030.00616.96
8.0.180.0030.00316.84
8.0.170.0070.00016.94
8.0.160.0020.00516.84
8.0.150.0000.00716.82
8.0.140.0000.00816.82
8.0.130.0000.00513.32
8.0.120.0040.00416.88
8.0.110.0040.00416.81
8.0.100.0030.00516.89
8.0.90.0000.00716.93
8.0.80.0040.01116.81
8.0.70.0000.00716.85
8.0.60.0070.00016.82
8.0.50.0030.00516.73
8.0.30.0140.00717.13
8.0.20.0090.00917.40
8.0.10.0000.00716.93
8.0.00.0090.01116.67
7.4.330.0050.00015.55
7.4.320.0040.00416.65
7.4.300.0070.00016.53
7.4.290.0000.00916.46
7.4.280.0040.00416.50
7.4.270.0000.00716.63
7.4.260.0000.00816.59
7.4.250.0000.00716.58
7.4.240.0000.00716.54
7.4.230.0030.00516.54
7.4.220.0090.01216.68
7.4.210.0090.00516.57
7.4.200.0030.00316.72
7.4.160.0110.00816.49
7.4.150.0100.00717.40
7.4.140.0100.01017.86
7.4.130.0200.00616.37
7.4.120.0130.00916.57
7.4.110.0090.01216.41
7.4.100.0080.00816.61
7.4.90.0070.01016.61
7.4.80.0100.01019.39
7.4.70.0110.01116.57
7.4.60.0110.00616.61
7.4.50.0030.01016.38
7.4.40.0070.01016.43
7.4.30.0070.01016.40
7.4.10.0120.00315.12
7.4.00.0080.00614.93
7.3.330.0030.00313.38
7.3.320.0020.00313.20
7.3.310.0000.00716.43
7.3.300.0070.00016.39
7.3.290.0030.00316.32
7.3.280.0110.00616.36
7.3.270.0170.01017.40
7.3.260.0120.00616.52
7.3.250.0090.01016.38
7.3.240.0070.01116.49
7.3.230.0060.01316.38
7.3.210.0180.00016.51
7.3.200.0030.01416.43
7.3.190.0110.00416.60
7.3.180.0100.00716.47
7.3.170.0090.00916.43
7.3.160.0110.00416.50
7.3.130.0060.01215.00
7.3.120.0060.01314.74
7.3.110.0100.01014.76
7.3.100.0060.00914.91
7.3.90.0030.01414.88
7.3.80.0120.00314.47
7.3.70.0070.00314.93
7.3.60.0030.01014.78
7.3.50.0060.00314.49
7.3.40.0000.01314.58
7.3.30.0070.00714.70
7.3.20.0090.00616.52
7.3.10.0090.00616.68
7.3.00.0090.00616.70
7.2.330.0120.01216.57
7.2.320.0110.01116.53
7.2.310.0070.01016.73
7.2.300.0070.01016.68
7.2.290.0080.01116.86
7.2.260.0150.00415.26
7.2.250.0040.01515.00
7.2.240.0030.01315.12
7.2.230.0100.00314.79
7.2.220.0100.00614.86
7.2.210.0070.00414.62
7.2.200.0030.00714.90
7.2.190.0060.01015.10
7.2.180.0030.00614.95
7.2.170.0030.01314.70
7.2.160.0090.00615.07
7.2.150.0090.00616.98
7.2.140.0060.00616.65
7.2.130.0030.01316.82
7.2.120.0030.01016.50
7.2.110.0100.00716.72
7.2.100.0080.00416.95
7.2.90.0060.00916.88
7.2.80.0000.01016.86
7.2.70.0040.01216.75
7.2.60.0000.01816.96
7.2.50.0060.00917.03
7.2.40.0000.00916.79
7.2.30.0030.01216.78
7.2.20.0110.00417.02
7.2.10.0030.01416.75
7.2.00.0080.00816.86
7.1.330.0040.01115.70
7.1.320.0000.01115.85
7.1.310.0030.00915.65
7.1.300.0040.01115.61
7.1.290.0070.00315.55
7.1.280.0000.01415.56
7.1.270.0070.00415.74
7.1.260.0030.01415.82
7.1.250.0140.00015.37
7.1.240.0060.00915.60
7.1.230.0060.00915.35
7.1.220.0060.00915.74
7.1.210.0040.00915.71
7.1.200.0050.00815.45
7.1.190.0090.00915.68
7.1.180.0040.00415.68
7.1.170.0030.00915.58
7.1.160.0000.00915.80
7.1.150.0030.01015.60
7.1.140.0030.01015.57
7.1.130.0040.00415.68
7.1.120.0090.00615.75
7.1.110.0040.01015.82
7.1.100.0100.00517.06
7.1.90.0030.01216.66
7.1.80.0110.00316.63
7.1.70.0000.01516.40
7.1.60.0120.00925.39
7.1.50.0080.01425.19
7.1.40.0090.01224.84
7.1.30.0100.01225.15
7.1.20.0140.01325.03
7.1.10.0060.01116.19
7.1.00.0070.01016.12
7.0.330.0040.01215.21
7.0.320.0000.01215.37
7.0.310.0060.00615.25
7.0.300.0030.00715.16
7.0.290.0070.01015.26
7.0.280.0100.00315.20
7.0.270.0040.00714.92
7.0.260.0100.00015.23
7.0.250.0070.00715.38
7.0.240.0050.00816.31
7.0.230.0060.00816.39
7.0.220.0080.00416.28
7.0.210.0040.01215.72
7.0.200.0070.00416.02
7.0.190.0050.01115.80
7.0.180.0060.00915.59
7.0.170.0030.01015.75
7.0.160.0040.01215.80
7.0.150.0070.00915.60
7.0.140.0070.01015.58
7.0.130.0120.00515.76
7.0.120.0090.00515.57
7.0.110.0060.00515.73
7.0.100.0030.00915.67
7.0.90.0050.01115.50
7.0.80.0060.01015.54
7.0.70.0050.00715.50
7.0.60.0070.00615.57
7.0.50.0020.01315.83
7.0.40.0070.01014.73
7.0.30.0060.01014.70
7.0.20.0030.01314.79
7.0.10.0070.00514.79
7.0.00.0030.00814.71
5.6.400.0060.00914.02
5.6.390.0060.00313.93
5.6.380.0000.00913.79
5.6.370.0030.01313.90
5.6.360.0040.01114.04
5.6.350.0030.00613.76
5.6.340.0060.00314.07
5.6.330.0000.00814.08
5.6.320.0030.01214.27
5.6.310.0000.01413.89
5.6.300.0030.01314.05
5.6.290.0070.01014.26
5.6.280.0000.01513.96
5.6.270.0110.00414.04
5.6.260.0000.00814.13
5.6.250.0000.00914.04
5.6.240.0120.00014.07
5.6.230.0030.01014.13
5.6.220.0070.00713.80
5.6.210.0000.01514.04
5.6.200.0070.00414.20
5.6.190.0040.01113.92
5.6.180.0080.00414.04
5.6.170.0070.00714.27
5.6.160.0050.00313.84
5.6.150.0080.00813.85
5.6.140.0060.00614.12
5.6.130.0070.00714.05
5.6.120.0070.00713.95
5.6.110.0080.00314.32
5.6.100.0080.00613.94
5.6.90.0090.00614.03
5.6.80.0060.00613.75
5.6.70.0030.01013.99
5.6.60.0080.00414.25
5.6.50.0060.00914.20
5.6.40.0060.00914.09
5.6.30.0090.00613.89
5.6.20.0000.01513.98
5.6.10.0110.00713.96
5.6.00.0040.00513.82

preferences:
53.83 ms | 401 KiB | 5 Q