3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait FooBarTrait { /** * @var string */ private $value; /** * {@inheritdoc} */ public function setValue(string $value): void { $this->value = $value; } /** * {@inheritdoc} */ public function getValue(): string { return $this->value; } } interface Bar { /** * @param string $value */ public function setValue(string $value): void; /** * @return string */ public function getValue(): string; } class Foo implements Bar { use FooBarTrait; } $foobar = new Foo(); $foobar->setValue('bob'); echo $foobar->getValue();

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.01018.56
8.3.50.0110.00416.48
8.3.40.0120.00318.79
8.3.30.0130.00718.84
8.3.20.0030.00619.28
8.3.10.0040.00419.27
8.3.00.0080.00019.76
8.2.180.0070.01125.92
8.2.170.0100.01019.02
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0050.00319.77
8.2.120.0040.00426.35
8.2.110.0030.00620.51
8.2.100.0040.00817.72
8.2.90.0040.00417.75
8.2.80.0040.00418.73
8.2.70.0000.00817.93
8.2.60.0000.00718.04
8.2.50.0030.00518.10
8.2.40.0040.00419.48
8.2.30.0000.00719.45
8.2.20.0040.00418.06
8.2.10.0040.00418.12
8.2.00.0040.00419.30
8.1.280.0110.00425.92
8.1.270.0040.00424.66
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0070.00423.79
8.1.230.0070.00320.87
8.1.220.0080.00018.52
8.1.210.0090.00018.77
8.1.200.0050.00317.35
8.1.190.0030.00617.35
8.1.180.0000.00818.10
8.1.170.0040.00418.68
8.1.160.0050.00218.86
8.1.150.0040.00418.80
8.1.140.0000.00817.67
8.1.130.0030.00519.02
8.1.120.0070.00017.44
8.1.110.0080.00017.51
8.1.100.0060.00317.36
8.1.90.0000.00817.36
8.1.80.0050.00317.46
8.1.70.0030.00317.47
8.1.60.0070.00317.48
8.1.50.0080.00017.52
8.1.40.0040.00417.52
8.1.30.0040.00417.70
8.1.20.0000.00817.62
8.1.10.0080.00017.66
8.1.00.0040.00417.54
8.0.300.0070.00018.77
8.0.290.0070.00016.63
8.0.280.0030.00318.49
8.0.270.0070.00017.25
8.0.260.0000.00618.50
8.0.250.0040.00316.84
8.0.240.0070.00016.91
8.0.230.0000.00716.98
8.0.220.0040.00416.78
8.0.210.0030.00316.89
8.0.200.0070.00016.92
8.0.190.0070.00016.85
8.0.180.0000.00816.91
8.0.170.0040.00416.91
8.0.160.0040.00416.96
8.0.150.0030.00316.93
8.0.140.0000.00716.86
8.0.130.0030.00313.34
8.0.120.0030.00516.88
8.0.110.0040.00416.80
8.0.100.0020.00516.86
8.0.90.0030.00316.86
8.0.80.0130.00316.89
8.0.70.0070.00016.84
8.0.60.0070.00017.01
8.0.50.0050.00316.68
8.0.30.0090.01017.02
8.0.20.0110.01117.40
8.0.10.0080.00016.93
8.0.00.0080.01016.92
7.4.330.0000.00515.55
7.4.320.0000.00616.59
7.4.300.0040.00416.65
7.4.290.0030.00316.61
7.4.280.0040.00416.59
7.4.270.0050.00216.64
7.4.260.0000.00816.51
7.4.250.0060.00316.60
7.4.240.0030.00316.59
7.4.230.0070.00016.39
7.4.220.0070.00016.70
7.4.210.0100.00616.67
7.4.200.0000.00816.63
7.4.160.0140.00816.52
7.4.140.0130.00717.86
7.4.130.0080.00816.35
7.4.120.0110.00816.56
7.4.110.0130.00416.48
7.4.100.0090.00616.50
7.4.90.0130.00316.68
7.4.80.0100.00719.39
7.4.70.0080.00816.62
7.4.60.0070.01116.52
7.4.50.0070.01116.14
7.4.40.0070.01116.34
7.4.00.0080.00914.84
7.3.330.0030.00313.24
7.3.320.0030.00313.21
7.3.310.0070.00016.26
7.3.300.0030.00316.11
7.3.290.0080.00016.25
7.3.280.0070.00816.22
7.3.260.0110.00616.49
7.3.240.0060.01116.40
7.3.230.0080.00816.47
7.3.210.0070.01416.46
7.3.200.0030.01516.38
7.3.190.0030.01316.43
7.3.180.0090.00616.46
7.3.170.0090.01216.21
7.3.160.0140.00416.31
7.3.120.0080.01014.53
7.3.110.0060.01014.65
7.3.100.0060.01114.85
7.3.90.0130.00514.70
7.3.80.0020.01414.83
7.3.70.0050.01014.65
7.3.60.0020.01114.70
7.3.50.0050.01314.70
7.3.40.0030.01214.64
7.3.30.0040.00614.63
7.3.20.0080.00816.49
7.3.10.0060.00816.57
7.3.00.0060.00816.58
7.2.330.0060.01116.80
7.2.320.0090.00916.78
7.2.310.0060.01616.59
7.2.300.0000.01816.40
7.2.290.0060.01216.87
7.2.250.0070.01015.03
7.2.240.0050.01214.94
7.2.230.0050.01114.99
7.2.220.0080.00515.07
7.2.210.0070.01115.01
7.2.200.0050.00515.12
7.2.190.0030.01214.93
7.2.180.0050.01115.03
7.2.170.0090.00915.00
7.2.60.2170.00914.92
7.2.50.1860.00714.82
7.2.40.2740.01115.29
7.2.30.2290.01015.29
7.2.20.1730.01115.30
7.2.10.2630.01015.53
7.2.00.0140.00715.31
7.1.330.0050.00815.72
7.1.320.0020.01415.68
7.1.310.0060.00615.70
7.1.300.0080.00815.69
7.1.290.0070.00915.72
7.1.280.0060.00715.69
7.1.270.0070.00715.74
7.1.260.0050.00815.57
7.1.200.0030.00315.47
7.1.170.2130.00713.47
7.1.160.1540.01216.84
7.1.150.2050.01316.56
7.1.140.2770.01016.57
7.1.130.0120.01316.84
7.1.120.0170.00916.41
7.1.110.0510.01515.96
7.1.100.0130.01215.84
7.1.90.1000.00615.66
7.1.80.2340.01016.29
7.1.70.0350.01215.29
7.1.60.0390.01833.26
7.1.50.3280.02132.93
7.1.40.0420.01632.54
7.1.30.2780.01332.70
7.1.20.0600.01432.61
7.1.10.0120.01314.93
7.1.00.0470.01214.88

preferences:
61.13 ms | 401 KiB | 5 Q