3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); class A { function f(): string { return (string) (new A()); } function __toString() { return "5"; } } echo (new A())->f(); echo "\n\r"; echo ((new A())->f()) + "2";

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.4.20.0100.01020.45
8.4.10.0060.00319.47
8.3.150.0110.00716.40
8.3.140.0060.01217.13
8.3.130.0000.00818.62
8.3.120.0090.00918.98
8.3.110.0000.00820.94
8.3.100.0040.00424.06
8.3.90.0030.00626.77
8.3.80.0050.00518.30
8.3.70.0100.01016.50
8.3.60.0070.00718.56
8.3.50.0080.00716.59
8.3.40.0140.00018.84
8.3.30.0110.00318.71
8.3.20.0040.00420.57
8.3.10.0040.00421.73
8.3.00.0000.00822.52
8.2.270.0080.01116.93
8.2.260.0100.00016.38
8.2.250.0040.00416.61
8.2.240.0100.00017.05
8.2.230.0060.00322.58
8.2.220.0070.00337.54
8.2.210.0040.00426.77
8.2.200.0080.00018.16
8.2.190.0060.01218.29
8.2.180.0120.00318.42
8.2.170.0120.00322.96
8.2.160.0110.00422.08
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00626.16
8.2.120.0050.00321.11
8.2.110.0090.00921.02
8.2.100.0080.00417.72
8.2.90.0050.00317.62
8.2.80.0080.00017.97
8.2.70.0050.00318.05
8.2.60.0090.00018.03
8.2.50.0060.00318.10
8.2.40.0040.00419.33
8.2.30.0040.00419.30
8.2.20.0030.00518.12
8.2.10.0040.00419.28
8.2.00.0080.00018.12
8.1.310.0090.00918.24
8.1.300.0100.00717.88
8.1.290.0060.00330.84
8.1.280.0070.01425.92
8.1.270.0000.00923.89
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00520.92
8.1.230.0000.01020.30
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.13
8.1.190.0040.00417.11
8.1.180.0080.00018.10
8.1.170.0040.00418.70
8.1.160.0000.00718.71
8.1.150.0070.00018.82
8.1.140.0070.00022.01
8.1.130.0040.00417.26
8.1.120.0000.00817.42
8.1.110.0040.00417.42
8.1.100.0000.00817.42
8.1.90.0000.00717.32
8.1.80.0040.00417.40
8.1.70.0000.00817.46
8.1.60.0040.00417.36
8.1.50.0030.00617.51
8.1.40.0030.00617.45
8.1.30.0000.01117.52
8.1.20.0000.01017.48
8.1.10.0070.00017.40
8.1.00.0050.00317.30
8.0.300.0000.00819.77
8.0.290.0060.00616.63
8.0.280.0040.00418.50
8.0.270.0000.00717.17
8.0.260.0000.00616.93
8.0.250.0000.00816.90
8.0.240.0030.00317.02
8.0.230.0000.00716.96
8.0.220.0050.00316.95
8.0.210.0030.00316.94
8.0.200.0000.00716.90
8.0.190.0080.00016.90
8.0.180.0040.00417.00
8.0.170.0080.00016.97
8.0.160.0020.00516.96
8.0.150.0000.00716.84
8.0.140.0040.00416.90
8.0.130.0030.00313.41
8.0.120.0030.00516.93
8.0.110.0000.00716.91
8.0.100.0000.00817.02
8.0.90.0070.00016.80
8.0.80.0030.01016.94
8.0.70.0000.00816.99
8.0.60.0040.00416.95
8.0.50.0000.00717.01
8.0.30.0110.00817.15
8.0.20.0150.00617.09
8.0.10.0000.00716.98
8.0.00.0110.01216.78
7.4.330.0020.00216.69
7.4.320.0080.00016.32
7.4.300.0060.00016.53
7.4.290.0000.00616.53
7.4.280.0040.00316.51
7.4.270.0000.00716.58
7.4.260.0000.00716.48
7.4.250.0000.00716.46
7.4.240.0000.00716.50
7.4.230.0070.00016.55
7.4.220.0040.00416.63
7.4.210.0090.00816.46
7.4.200.0030.00316.56
7.4.160.0060.00916.42
7.4.140.0140.00617.86
7.4.130.0060.01116.19
7.4.120.0070.01016.26
7.4.110.0070.01016.27
7.4.100.0120.00916.66
7.4.90.0040.01316.55
7.4.80.0060.02019.39
7.4.70.0030.01316.65
7.4.60.0120.00916.44
7.4.50.0060.00916.32
7.4.40.0060.01016.27
7.4.00.0000.01315.06
7.3.330.0020.00213.15
7.3.320.0030.00313.10
7.3.310.0000.00716.25
7.3.300.0070.00016.20
7.3.290.0030.00316.29
7.3.280.0050.00916.25
7.3.260.0100.00916.28
7.3.240.0120.00516.32
7.3.230.0030.01216.27
7.3.210.0120.00416.54
7.3.200.0030.01316.39
7.3.190.0060.01016.41
7.3.180.0120.00316.43
7.3.170.0070.01616.59
7.3.160.0130.00516.43
7.3.30.0060.00914.67
7.3.20.1400.00514.74
7.3.10.1560.01014.62
7.3.00.1070.00714.86
7.2.330.0070.01116.42
7.2.320.0080.01116.31
7.2.310.0100.00716.60
7.2.300.0040.01316.30
7.2.290.0130.00716.47
7.2.160.0050.00814.77
7.2.150.1270.00714.92
7.2.140.1420.00714.97
7.2.130.1230.00814.68
7.2.120.1080.00515.00
7.2.110.1270.00714.92
7.2.100.1140.00714.72
7.2.90.1370.00314.86
7.2.80.1140.00715.10
7.2.70.1060.00514.92
7.2.60.1310.00214.96
7.2.50.1110.00715.05
7.2.40.1130.00514.92
7.2.30.1160.00314.88
7.2.20.1100.00814.95
7.2.10.1160.00715.14
7.2.00.1270.00215.03
7.1.270.1270.00513.93
7.1.260.1160.00213.83
7.1.250.1380.00313.70

preferences:
36.35 ms | 403 KiB | 5 Q