3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getRef(&$var) { } function &returnRef1() { $a = 5; return $a; } function returnNonRef1() { $a = 5; return $a; } class A{ static function &returnRef2() { $a = 5; return $a; } function &returnRef3() { $a = 5; return $a; } } getRef(returnRef1()); getRef(A::returnRef2()); getRef((new A())->returnRef3()); getRef(returnNonRef1()); echo "Done\n";

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.0040.01116.63
8.3.50.0170.00316.34
8.3.40.0080.00818.48
8.3.30.0040.01118.76
8.3.20.0070.00020.16
8.3.10.0040.00421.73
8.3.00.0040.00417.57
8.2.180.0100.01016.50
8.2.170.0150.00422.96
8.2.160.0110.00420.52
8.2.150.0040.01124.18
8.2.140.0050.00524.66
8.2.130.0090.00320.97
8.2.120.0070.00026.35
8.2.110.0070.00319.39
8.2.100.0080.00418.22
8.2.90.0000.00819.18
8.2.80.0040.00418.03
8.2.70.0000.01017.63
8.2.60.0000.00818.03
8.2.50.0090.00018.10
8.2.40.0000.00822.09
8.2.30.0040.00420.97
8.2.20.0070.00018.05
8.2.10.0000.00817.97
8.2.00.0070.00017.96
8.1.280.0030.01725.92
8.1.270.0000.00823.77
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0040.00422.23
8.1.230.0080.00317.42
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0090.00017.23
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0090.00018.66
8.1.160.0030.00318.86
8.1.150.0040.00420.60
8.1.140.0000.00819.52
8.1.130.0030.00518.74
8.1.120.0070.00017.42
8.1.110.0000.00817.39
8.1.100.0000.00817.38
8.1.90.0000.00817.30
8.1.80.0040.00417.38
8.1.70.0030.00317.43
8.1.60.0000.00817.52
8.1.50.0050.00317.42
8.1.40.0050.00317.47
8.1.30.0040.00417.55
8.1.20.0000.00717.55
8.1.10.0020.00517.45
8.1.00.0080.00017.40
8.0.300.0020.00518.77
8.0.290.0050.00216.63
8.0.280.0030.00518.55
8.0.270.0000.00717.27
8.0.260.0000.00816.79
8.0.250.0030.00316.87
8.0.240.0040.00416.94
8.0.230.0050.00216.94
8.0.220.0030.00316.91
8.0.210.0000.00816.86
8.0.200.0030.00316.82
8.0.190.0000.00816.82
8.0.180.0030.00616.93
8.0.170.0050.00316.95
8.0.160.0000.00716.73
8.0.150.0000.00716.82
8.0.140.0030.00316.83
8.0.130.0030.00313.41
8.0.120.0000.00816.87
8.0.110.0070.00016.85
8.0.100.0070.00016.99
8.0.90.0040.00416.85
8.0.80.0040.01816.93
8.0.70.0000.00716.69
8.0.60.0070.00016.71
8.0.50.0000.00816.86
8.0.30.0140.00317.10
8.0.20.0110.00817.40
8.0.10.0080.00016.98
8.0.00.0090.00916.76
7.4.330.0030.00315.55
7.4.320.0000.00716.46
7.4.300.0070.00016.61
7.4.290.0080.00316.49
7.4.280.0070.00016.40
7.4.270.0000.00716.46
7.4.260.0030.00313.18
7.4.250.0000.00716.45
7.4.240.0080.00016.52
7.4.230.0040.00416.67
7.4.220.0070.01016.52
7.4.210.0060.01016.55
7.4.200.0030.00416.50
7.4.160.0090.00916.37
7.4.150.0190.00017.40
7.4.140.0090.01117.86
7.4.130.0090.01816.40
7.4.120.0110.00716.58
7.4.110.0100.00716.41
7.4.100.0090.00916.55
7.4.90.0170.00016.44
7.4.80.0080.00819.39
7.4.70.0100.01016.41
7.4.60.0100.00716.59
7.4.50.0030.00816.48
7.4.40.0090.00616.49
7.4.30.0100.00716.71
7.4.00.0100.00314.99
7.3.330.0020.00213.33
7.3.320.0000.00613.32
7.3.310.0000.00716.23
7.3.300.0080.00016.31
7.3.290.0050.01016.38
7.3.280.0080.00816.34
7.3.270.0110.00717.40
7.3.260.0140.00816.52
7.3.250.0110.00816.39
7.3.240.0100.00816.37
7.3.230.0060.01216.40
7.3.210.0130.00416.34
7.3.200.0120.00416.38
7.3.190.0120.00316.38
7.3.180.0100.01016.53
7.3.170.0120.00916.31
7.3.160.0000.01616.36
7.2.330.0130.00416.63
7.2.320.0070.01116.37
7.2.310.0100.00616.48
7.2.300.0030.01416.57
7.2.290.0000.01716.47
7.2.60.0080.00616.71
7.2.00.0070.01019.46
7.1.200.0040.00715.69
7.1.100.0030.01017.97
7.1.70.0050.00817.18
7.1.60.0100.01735.05
7.1.50.0150.01534.63
7.1.40.0200.02134.42
7.1.30.0180.01834.29
7.1.20.0250.01134.43
7.1.10.0060.01316.58
7.1.00.0100.00816.29
7.0.200.0060.00616.80
7.0.190.0030.01116.68
7.0.180.0040.01316.28
7.0.170.0090.01016.24
7.0.160.0060.01016.12
7.0.150.0120.00616.22
7.0.140.0060.01116.31
7.0.130.0060.01216.28
7.0.120.0140.00316.38
7.0.110.0070.00516.48
7.0.100.0100.00716.54
7.0.90.0060.01216.42
7.0.80.0030.01016.36
7.0.70.0120.00316.16
7.0.60.0000.01616.18
7.0.50.0120.00616.24
7.0.40.0060.01116.51
7.0.30.0060.01116.54
7.0.20.0060.01216.41
7.0.10.0030.01516.34
7.0.00.0000.01716.10

preferences:
50.66 ms | 401 KiB | 5 Q