3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); interface Foo { /** * @return string|object The violation message as a string or a stringable object */ function getMessage(); } class SomeMessage implements Foo { /** * {@inheritDoc} */ public function getMessage() { return new class { public function __toString(): string { return 'Hello World'; } }; } }; (static function (string $message): void { echo $message; })((new SomeMessage())->getMessage());

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.0080.00618.68
8.3.50.0070.00717.78
8.3.40.0110.00418.88
8.3.30.0120.00318.52
8.3.20.0040.00720.73
8.3.10.0040.00420.19
8.3.00.0040.00420.61
8.2.180.0070.01416.50
8.2.170.0090.00622.96
8.2.160.0090.00922.01
8.2.150.0080.00024.18
8.2.140.0020.00524.66
8.2.130.0070.00026.16
8.2.120.0090.00926.16
8.2.110.0030.00722.25
8.2.100.0110.00017.84
8.2.90.0060.00318.03
8.2.80.0080.00017.97
8.2.70.0000.00817.93
8.2.60.0040.00418.16
8.2.50.0060.00318.10
8.2.40.0050.00319.48
8.2.30.0000.00819.21
8.2.20.0030.00618.12
8.2.10.0050.00218.93
8.2.00.0040.00419.15
8.1.280.0170.00325.92
8.1.270.0080.00020.88
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0080.00417.35
8.1.230.0040.00721.03
8.1.220.0000.00917.79
8.1.210.0000.00818.77
8.1.200.0070.00417.12
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0050.00318.71
8.1.160.0030.00318.80
8.1.150.0000.00718.71
8.1.140.0000.00720.63
8.1.130.0070.00017.40
8.1.120.0000.00717.39
8.1.110.0050.00317.39
8.1.100.0040.00417.38
8.1.90.0060.00317.30
8.1.80.0020.00517.45
8.1.70.0000.00717.32
8.1.60.0030.00517.55
8.1.50.0070.00417.52
8.1.40.0030.00617.48
8.1.30.0030.00617.62
8.1.20.0050.00317.63
8.1.10.0040.00417.49
8.1.00.0030.00617.42
8.0.300.0040.00420.07
8.0.290.0070.00016.75
8.0.280.0040.00418.48
8.0.270.0000.00817.25
8.0.260.0000.00716.92
8.0.250.0070.00317.04
8.0.240.0030.00317.02
8.0.230.0030.00316.91
8.0.220.0030.00316.93
8.0.210.0030.00316.99
8.0.200.0030.00316.90
8.0.190.0000.00817.01
8.0.180.0040.00417.00
8.0.170.0060.00317.01
8.0.160.0030.00516.99
8.0.150.0040.00416.88
8.0.140.0080.00016.82
8.0.130.0030.00313.41
8.0.120.0050.00316.95
8.0.110.0000.00816.80
8.0.100.0070.00016.91
8.0.90.0040.00416.84
8.0.80.0040.01716.94
8.0.70.0050.00217.00
8.0.60.0040.00416.84
8.0.50.0040.00416.98
8.0.30.0130.00317.14
8.0.20.0110.00817.04
8.0.10.0030.00517.01
8.0.00.0070.01016.88
7.4.330.0050.00015.55
7.4.320.0000.00616.61
7.4.300.0030.00316.58
7.4.290.0000.00716.48
7.4.280.0020.00516.50
7.4.270.0070.00016.62
7.4.260.0030.00313.27
7.4.250.0000.00716.48
7.4.240.0020.00516.47
7.4.230.0030.00316.62
7.4.220.0030.00416.41
7.4.210.0130.00316.56
7.4.200.0000.00716.60
7.4.130.0100.01016.83
7.4.120.0140.00416.63
7.4.110.0100.00716.38
7.4.100.0100.01016.58
7.4.90.0100.00716.54
7.4.80.0100.00719.39
7.4.70.0100.00616.27
7.4.60.0100.00716.55
7.4.50.0090.00916.13
7.4.40.0120.00916.29
7.4.10.0040.01115.20
7.4.00.0110.00414.95
7.3.330.0070.00016.46
7.3.320.0000.00513.31
7.3.310.0030.00316.36
7.3.300.0000.00616.38
7.3.290.0080.00716.36
7.3.280.0070.00716.35
7.3.260.0130.00416.50
7.3.240.0120.00716.48
7.3.230.0000.01816.34
7.3.210.0090.00616.21
7.3.200.0120.00516.54
7.3.190.0160.00616.43
7.3.180.0060.00916.38
7.3.170.0130.00316.43
7.3.160.0080.00716.32
7.3.130.0130.00614.62
7.3.120.0050.01014.77
7.3.110.0090.00814.62
7.3.100.0070.00714.71
7.3.90.0060.00914.78
7.3.80.0100.00114.82
7.3.70.0080.00614.74
7.3.60.0070.00414.63
7.3.50.0040.01014.60
7.3.40.0080.00914.58
7.3.30.0050.00814.73
7.3.20.0100.00115.57
7.3.10.0040.01115.75
7.3.00.0060.01115.53
7.2.330.0030.01416.69
7.2.320.0030.01516.71
7.2.310.0080.00816.57
7.2.300.0090.00916.71
7.2.290.0140.00816.71
7.2.260.0070.01114.39
7.2.250.0070.00714.51
7.2.240.0060.01114.89
7.2.230.0060.00814.94
7.2.220.0080.00714.65
7.2.210.0040.00815.10
7.2.200.0040.00914.97
7.2.190.0100.00114.84
7.2.180.0060.00914.77
7.2.170.0070.00914.88
7.2.160.0080.00715.03
7.2.150.0050.00716.01
7.2.140.0080.00815.84
7.2.130.0080.00715.89
7.2.120.0130.00116.05
7.2.110.0070.00715.83
7.2.100.0100.00515.97
7.2.90.0060.00715.92
7.2.80.0100.00515.80
7.2.70.0070.00915.98
7.2.60.0050.00715.89
7.2.50.0060.00815.95
7.2.40.0060.00915.97
7.2.30.0090.00815.96
7.2.20.0070.00815.69
7.2.10.0050.00615.97
7.2.00.0070.00615.75
7.1.330.0050.00914.73
7.1.320.0090.00714.66
7.1.310.0040.00914.56
7.1.300.0050.00614.53
7.1.290.0130.00514.65
7.1.280.0090.00414.73
7.1.270.0030.00814.69
7.1.260.0040.00814.55
7.1.250.0060.00914.77
7.1.240.0030.01315.75
7.1.230.0000.01215.70
7.1.220.0030.00915.58
7.1.210.0030.01015.64
7.1.200.0130.00015.85
7.1.190.0000.00915.67
7.1.180.0030.00715.52
7.1.170.0060.00915.74
7.1.160.0000.01315.65
7.1.150.0030.00915.36
7.1.140.0000.00815.55
7.1.130.0070.00715.73
7.1.120.0060.00615.65
7.1.110.0100.00315.68
7.1.100.0070.00715.86
7.1.90.0060.00615.62
7.1.80.0030.00615.04
7.1.70.0070.00315.21
7.1.60.0050.00515.66
7.1.50.0030.00615.36
7.1.40.0030.00715.55
7.1.30.0000.01215.69
7.1.20.0080.00515.52
7.1.10.0000.01015.51
7.1.00.0070.00715.32

preferences:
51.59 ms | 400 KiB | 5 Q