3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getRef(&$var) { } function &returnRef1() { $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()); 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.70.0030.01918.03
8.3.60.0110.00416.50
8.3.50.0110.01116.41
8.3.40.0120.00318.66
8.3.30.0090.00918.71
8.3.20.0080.00020.33
8.3.10.0040.00421.79
8.3.00.0110.00417.62
8.2.190.0070.01416.58
8.2.180.0000.01516.50
8.2.170.0120.00322.96
8.2.160.0080.00520.43
8.2.150.0160.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00421.04
8.2.120.0020.00526.35
8.2.110.0070.00320.46
8.2.100.0040.00817.91
8.2.90.0080.00019.21
8.2.80.0030.00517.97
8.2.70.0000.00917.63
8.2.60.0000.00718.04
8.2.50.0030.00518.10
8.2.40.0080.00022.37
8.2.30.0000.00720.89
8.2.20.0000.00718.02
8.2.10.0030.00618.07
8.2.00.0040.00418.02
8.1.280.0070.01125.92
8.1.270.0060.00323.84
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.92
8.1.230.0030.00919.01
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0040.00417.36
8.1.190.0030.00617.13
8.1.180.0000.00818.10
8.1.170.0030.00618.53
8.1.160.0040.00419.07
8.1.150.0050.00218.89
8.1.140.0040.00419.52
8.1.130.0080.00018.84
8.1.120.0040.00417.30
8.1.110.0000.00717.39
8.1.100.0070.00017.45
8.1.90.0030.00617.46
8.1.80.0000.00717.46
8.1.70.0050.00217.37
8.1.60.0040.00417.48
8.1.50.0000.00817.54
8.1.40.0070.00317.43
8.1.30.0040.00417.59
8.1.20.0000.00817.65
8.1.10.0000.00817.48
8.1.00.0040.00417.54
8.0.300.0000.00818.77
8.0.290.0030.00516.75
8.0.280.0030.00318.33
8.0.270.0050.00317.27
8.0.260.0030.00316.74
8.0.250.0000.00616.93
8.0.240.0000.00816.88
8.0.230.0000.00616.90
8.0.220.0000.00716.73
8.0.210.0000.00716.85
8.0.200.0000.00716.76
8.0.190.0040.00416.90
8.0.180.0050.00216.84
8.0.170.0050.00316.77
8.0.160.0000.00716.84
8.0.150.0050.00216.71
8.0.140.0040.00416.82
8.0.130.0030.00313.29
8.0.120.0000.00816.80
8.0.110.0090.00016.86
8.0.100.0070.00016.74
8.0.90.0020.00516.74
8.0.80.0060.00916.83
8.0.70.0000.00716.95
8.0.60.0040.00416.63
8.0.50.0040.00416.71
8.0.30.0120.00417.08
8.0.20.0120.00717.41
8.0.10.0040.00416.84
8.0.00.0120.00616.73
7.4.330.0050.00015.55
7.4.320.0050.00216.57
7.4.300.0040.00416.58
7.4.290.0070.00416.61
7.4.280.0040.00416.54
7.4.270.0040.00416.41
7.4.260.0000.00513.26
7.4.250.0030.00316.37
7.4.240.0000.00716.44
7.4.230.0080.00016.26
7.4.220.0090.01516.42
7.4.210.0140.00016.66
7.4.200.0030.00316.43
7.4.160.0080.00816.47
7.4.150.0070.01017.40
7.4.140.0110.00617.86
7.4.130.0120.00916.73
7.4.120.0090.00816.59
7.4.110.0070.01116.48
7.4.100.0080.00816.63
7.4.90.0070.01016.37
7.4.80.0130.00619.39
7.4.70.0030.01316.43
7.4.60.0080.00816.27
7.4.50.0030.00816.38
7.4.40.0080.00816.64
7.4.30.0060.01216.45
7.4.00.0060.01114.81
7.3.330.0000.00513.07
7.3.320.0030.00313.16
7.3.310.0000.00616.22
7.3.300.0080.00016.32
7.3.290.0070.01016.29
7.3.280.0090.00816.30
7.3.270.0090.00917.40
7.3.260.0170.00716.32
7.3.250.0100.01116.40
7.3.240.0050.01216.42
7.3.230.0120.00916.36
7.3.210.0080.00816.56
7.3.200.0100.00616.29
7.3.190.0030.01316.57
7.3.180.0100.00616.34
7.3.170.0070.01016.31
7.3.160.0100.01016.42
7.3.120.0030.01415.04
7.3.110.0060.00814.53
7.3.100.0070.01114.68
7.3.90.0040.01114.76
7.3.80.0070.01115.06
7.3.70.0030.00714.83
7.3.60.0040.01214.90
7.3.50.0060.00614.75
7.3.40.0000.01414.75
7.3.30.0000.01514.54
7.3.20.0080.00416.74
7.3.10.0060.00616.58
7.3.00.0030.01016.65
7.2.330.0130.00616.38
7.2.320.0170.00616.38
7.2.310.0070.01016.53
7.2.300.0100.00916.64
7.2.290.0070.01016.72
7.2.250.0040.01514.78
7.2.240.0060.01215.04
7.2.230.0090.00014.79
7.2.220.0040.01215.14
7.2.210.0060.01214.94
7.2.200.0110.00414.73
7.2.190.0030.01314.99
7.2.180.0030.00914.94
7.2.170.0000.01414.68
7.2.160.0070.00714.84
7.2.150.0030.00916.91
7.2.140.0000.00916.89
7.2.130.0050.00616.56
7.2.120.0000.01316.79
7.2.110.0050.00816.86
7.2.100.0060.00616.73
7.2.90.0080.00616.91
7.2.80.0080.00716.74
7.2.70.0050.00916.76
7.2.60.0080.00716.81
7.2.50.0080.00516.69
7.2.40.0040.00716.76
7.2.30.0020.01416.82
7.2.20.0040.00816.81
7.2.10.0030.01116.72
7.2.00.0030.01117.55
7.1.330.0060.01015.50
7.1.320.0080.00415.76
7.1.310.0060.00615.38
7.1.300.0050.00515.63
7.1.290.0080.00415.59
7.1.280.0040.00815.70
7.1.270.0040.01115.40
7.1.260.0030.00915.65
7.1.250.0070.00815.75
7.1.240.0030.01015.61
7.1.230.0080.00615.79
7.1.220.0040.00715.74
7.1.210.0060.00315.68
7.1.200.0000.01615.68
7.1.190.0060.01015.35
7.1.180.0000.00915.57
7.1.170.0070.00315.51
7.1.160.0070.00715.55
7.1.150.0040.01115.75
7.1.140.0070.00715.71
7.1.130.0030.00915.63
7.1.120.0000.00915.32
7.1.110.0030.01415.75
7.1.100.0030.01116.81
7.1.90.0120.00315.64
7.1.80.0030.00915.40
7.1.70.0060.01016.26
7.1.60.0110.01025.23
7.1.50.0110.01025.02
7.1.40.0100.01025.06
7.1.30.0120.01024.80
7.1.20.0140.01025.08
7.1.10.0010.01416.09
7.1.00.0080.00516.04
7.0.330.0040.00715.33
7.0.320.0030.01015.52
7.0.310.0040.01215.19
7.0.300.0080.00815.04
7.0.290.0040.01115.07
7.0.280.0030.01015.39
7.0.270.0000.01315.29
7.0.260.0000.00815.34
7.0.250.0000.00915.45
7.0.240.0090.00615.50
7.0.230.0050.00815.27
7.0.220.0030.00815.41
7.0.210.0000.01815.33
7.0.200.0070.00716.07
7.0.190.0070.00616.07
7.0.180.0050.00915.68
7.0.170.0090.00215.64
7.0.160.0070.00915.75
7.0.150.0030.01315.67
7.0.140.0050.00915.83
7.0.130.0060.00915.81
7.0.120.0090.00815.79
7.0.110.0070.00815.88
7.0.100.0030.01215.82
7.0.90.0060.00615.83
7.0.80.0030.01215.77
7.0.70.0020.01315.88
7.0.60.0080.00715.86
7.0.50.0100.00315.76
7.0.40.0070.00914.74
7.0.30.0080.00514.96
7.0.20.0040.00914.80
7.0.10.0030.00814.89
7.0.00.0040.01114.93
5.6.400.0040.01114.11
5.6.390.0040.00713.96
5.6.380.0000.01214.32
5.6.370.0030.00914.54
5.6.360.0000.01314.11
5.6.350.0050.01014.28
5.6.340.0030.00614.30
5.6.330.0060.00314.51
5.6.320.0030.00614.26
5.6.310.0030.01014.65
5.6.300.0030.01514.27
5.6.290.0080.00414.21
5.6.280.0100.00314.41
5.6.270.0070.01114.26
5.6.260.0070.00714.41
5.6.250.0060.00314.39
5.6.240.0000.01414.29
5.6.230.0000.01014.42
5.6.220.0110.00414.34
5.6.210.0060.01014.25
5.6.200.0060.00914.21
5.6.190.0100.00714.12
5.6.180.0070.00414.17
5.6.170.0060.00614.54
5.6.160.0070.00714.34
5.6.150.0070.00714.23
5.6.140.0030.00613.98
5.6.130.0030.01014.07
5.6.120.0090.00614.23
5.6.110.0080.00313.95
5.6.100.0090.00014.24
5.6.90.0000.01314.52
5.6.80.0070.00414.23
5.6.70.0000.01414.05
5.6.60.0130.00014.08
5.6.50.0000.01314.17
5.6.40.0100.00314.21
5.6.30.0060.00314.13
5.6.20.0110.00414.29
5.6.10.0030.01314.24
5.6.00.0140.00014.24

preferences:
19 ms | 401 KiB | 5 Q