3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo implements stringable { public function __toString(): string { return "John"; } } function bar(string $blah) { echo $blah; } function quux(string|stringable $value) { bar((string)$value); } quux(new Foo);

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.5.30.0070.01119.64
8.5.20.0080.01019.49
8.5.10.0100.00716.34
8.5.00.0140.00719.95
8.4.180.0100.01022.07
8.4.170.0120.00920.25
8.4.160.0030.00623.82
8.4.150.0090.00416.86
8.4.140.0150.00617.68
8.4.130.0150.00617.87
8.4.120.0080.01124.34
8.4.110.0060.00322.38
8.4.100.0070.00618.60
8.4.90.0070.01318.71
8.4.80.0080.00918.56
8.4.70.0110.00918.90
8.4.60.0110.01020.36
8.4.50.0130.00618.81
8.4.40.0130.00719.28
8.4.30.0040.00420.27
8.4.20.0070.01018.58
8.4.10.0040.00417.72
8.3.300.0110.00820.59
8.3.290.0140.00720.73
8.3.280.0120.00818.38
8.3.270.0110.00816.66
8.3.260.0050.00416.71
8.3.250.0080.01118.86
8.3.240.0110.00817.01
8.3.230.0120.00716.36
8.3.220.0110.00819.06
8.3.210.0060.00616.55
8.3.200.0070.00316.59
8.3.190.0070.00217.15
8.3.180.0100.00919.08
8.3.170.0110.00717.17
8.3.160.0070.01518.93
8.3.150.0090.00916.50
8.3.140.0110.00716.48
8.3.130.0080.00018.27
8.3.120.0030.00618.73
8.3.110.0040.00420.94
8.3.100.0150.00024.06
8.3.90.0000.00826.77
8.3.80.0090.00016.75
8.3.70.0110.00416.58
8.3.60.0110.00716.50
8.3.50.0070.01116.64
8.3.40.0100.00718.54
8.3.30.0110.00418.59
8.3.20.0040.00424.18
8.3.10.0050.00224.66
8.3.00.0070.00026.16
8.2.300.0130.00622.05
8.2.290.0100.00920.57
8.2.280.0110.00720.14
8.2.270.0110.00718.19
8.2.260.0110.00716.78
8.2.250.0090.00916.82
8.2.240.0040.00418.09
8.2.230.0090.00022.58
8.2.220.0100.01037.54
8.2.210.0070.00726.77
8.2.200.0060.00316.50
8.2.190.0140.00716.75
8.2.180.0140.00025.92
8.2.170.0090.00918.96
8.2.160.0130.00722.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00021.03
8.2.110.0000.00920.53
8.2.100.0070.00322.23
8.1.340.0110.00917.69
8.1.330.0090.00921.72
8.1.320.0110.00917.97
8.1.310.0000.00818.52
8.1.300.0030.00518.04
8.1.290.0060.00330.84
8.1.280.0090.01225.92
8.1.270.0040.00423.99
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0060.00320.37
8.1.230.0050.00518.97
8.0.30.0090.01316.85
8.0.20.0100.01116.98
8.0.10.0140.01016.88
8.0.00.0060.01916.97
7.4.160.0100.00716.32
7.4.150.0070.01016.32
7.4.140.0120.00916.14
7.4.130.0110.00716.27
7.4.120.0030.01716.24
7.4.110.0090.01216.18
7.4.100.0030.01716.41
7.4.90.0080.00916.23
7.4.80.0080.00816.21
7.4.70.0080.00816.12
7.4.60.0130.00816.35
7.4.50.0100.00716.34
7.4.40.0070.01416.14
7.4.30.0070.00716.12
7.4.20.0050.01016.13
7.4.10.0140.00016.18
7.4.00.0070.00716.39
7.3.280.0090.01316.14
7.3.270.0130.00416.20
7.3.260.0100.01316.16
7.3.250.0050.01116.14
7.3.240.0180.00416.21
7.3.230.0130.00816.21
7.3.220.0050.01416.14
7.3.210.0080.00816.13
7.3.200.0040.01116.08
7.3.190.0120.00916.14
7.3.180.0130.00816.06
7.3.170.0130.00616.05
7.3.160.0090.00916.20
7.3.150.0030.01016.12
7.3.140.0110.00316.00
7.3.130.0080.00516.10
7.3.120.0000.01416.07
7.3.110.0090.00616.09
7.3.100.0070.00716.03
7.3.90.0070.00716.36
7.3.80.0080.00816.15
7.3.70.0040.01216.26
7.3.60.0070.00716.22
7.3.50.0070.00716.20
7.3.40.0070.00616.23
7.3.30.0070.01016.21
7.3.20.0110.00616.18
7.3.10.0100.00316.11
7.3.00.0030.01016.11

preferences:
65.79 ms | 1052 KiB | 5 Q