3v4l.org

run code in 300+ PHP versions simultaneously
<?php $GLOBALS['bar'] = 5; function &getSpecialValue() { return $GLOBALS['bar']; } class Foo { public $value = 3; function &getValue() { return $this->value; } function test() { $params = array(); $params[] = &$this->getValue(); $params[] = $this->getValue(); $params[] = getSpecialValue(); return $params; } } $foo = new Foo(); var_dump($foo->test());

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.0110.01118.43
8.3.50.0090.01021.14
8.3.40.0110.00318.88
8.3.30.0090.00619.04
8.3.20.0050.00320.29
8.3.10.0040.00422.02
8.3.00.0040.00422.57
8.2.180.0110.00416.63
8.2.170.0100.01022.96
8.2.160.0070.00719.34
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.01126.16
8.2.120.0040.00419.77
8.2.110.0090.00920.92
8.2.100.0120.00017.66
8.2.90.0080.00019.22
8.2.80.0090.00018.05
8.2.70.0000.00917.50
8.2.60.0040.00418.04
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0000.00817.99
8.2.20.0050.00217.62
8.2.10.0040.00417.68
8.2.00.0050.00517.61
8.1.280.0110.00325.92
8.1.270.0060.00320.48
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.00319.46
8.1.230.0050.01017.85
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0030.00617.38
8.1.190.0030.00517.61
8.1.180.0000.00818.72
8.1.170.0040.00418.71
8.1.160.0000.00722.13
8.1.150.0040.00418.68
8.1.140.0050.00317.45
8.1.130.0030.00317.82
8.1.120.0050.00217.46
8.1.110.0040.00417.35
8.1.100.0000.00717.32
8.1.90.0000.00817.51
8.1.80.0000.00717.37
8.1.70.0000.00717.40
8.1.60.0040.00417.61
8.1.50.0040.00417.46
8.1.40.0030.00617.45
8.1.30.0070.00017.57
8.1.20.0080.00017.54
8.1.10.0060.00317.51
8.1.00.0040.00717.52
8.0.300.0070.00018.77
8.0.290.0030.00317.18
8.0.280.0000.00718.36
8.0.270.0030.00317.16
8.0.260.0000.00616.72
8.0.250.0030.00316.84
8.0.240.0030.00616.94
8.0.230.0000.00716.85
8.0.220.0030.00316.89
8.0.210.0030.00316.84
8.0.200.0000.00616.98
8.0.190.0030.00516.96
8.0.180.0070.00016.93
8.0.170.0000.00716.80
8.0.160.0000.00716.96
8.0.150.0040.00716.75
8.0.140.0030.00516.79
8.0.130.0000.00713.32
8.0.120.0030.00616.96
8.0.110.0000.00716.84
8.0.100.0000.00717.00
8.0.90.0030.00516.76
8.0.80.0110.00416.88
8.0.70.0000.00816.96
8.0.60.0050.00316.90
8.0.50.0000.00716.68
8.0.30.0120.00717.09
8.0.20.0110.00717.40
8.0.10.0000.00816.89
8.0.00.0090.01116.69
7.4.330.0030.00315.00
7.4.320.0030.00316.48
7.4.300.0000.00616.55
7.4.290.0050.00216.48
7.4.280.0030.00316.60
7.4.270.0040.00416.40
7.4.260.0040.00416.49
7.4.250.0000.00916.47
7.4.240.0030.00316.47
7.4.230.0030.00316.38
7.4.220.0130.00916.53
7.4.210.0120.00416.61
7.4.200.0030.00316.24
7.4.190.0000.00716.35
7.4.160.0030.01316.47
7.4.150.0130.00317.40
7.4.140.0080.01117.86
7.4.130.0100.00916.49
7.4.120.0120.00416.46
7.4.110.0080.00816.33
7.4.100.0060.01216.54
7.4.90.0100.01316.48
7.4.80.0110.00619.39
7.4.70.0110.01116.46
7.4.60.0030.01316.41
7.4.50.0020.00216.35
7.4.40.0040.01522.77
7.4.30.0130.01016.41
7.4.00.0090.00614.80
7.3.330.0050.00013.19
7.3.320.0000.00513.22
7.3.310.0070.00016.40
7.3.300.0000.00716.23
7.3.290.0030.01016.34
7.3.280.0070.00816.36
7.3.270.0060.00917.40
7.3.260.0140.00716.48
7.3.250.0150.00516.50
7.3.240.0090.01516.40
7.3.230.0090.01216.39
7.3.210.0130.00416.51
7.3.200.0000.01719.39
7.3.190.0070.01016.33
7.3.180.0040.01316.43
7.3.170.0070.01016.47
7.3.160.0150.00616.48
7.3.120.0080.00814.65
7.2.330.0070.01416.77
7.2.320.0070.01716.67
7.2.310.0060.01616.26
7.2.300.0120.00416.54
7.2.290.0070.01016.69
7.2.00.0030.01319.61
7.1.100.0040.00717.89
7.1.70.0100.00017.18
7.1.60.0060.01919.82
7.1.50.0120.00916.99
7.1.00.0030.05722.33
7.0.200.0420.00714.38
7.0.140.0200.05322.15
7.0.60.0070.08319.91
7.0.50.0030.06017.87
7.0.40.0070.04020.20
7.0.30.0330.07320.06
7.0.20.0230.08320.20
7.0.10.0030.04320.16
7.0.00.0070.07020.14
5.6.280.0000.07721.13
5.6.210.0030.09020.70
5.6.200.0000.04318.20
5.6.190.0030.04320.61
5.6.180.0370.04720.67
5.6.170.0270.04020.39
5.6.160.0100.05020.69
5.6.150.0030.04318.29
5.6.140.0000.04718.12
5.6.130.0100.07718.16
5.6.120.0030.05321.00
5.6.110.0130.07321.13
5.6.100.0170.07721.14
5.6.90.0030.09021.11
5.6.80.0000.08720.41
5.5.350.0200.09020.30
5.5.340.0100.07718.02
5.5.330.0070.04320.19
5.5.320.3000.04720.25
5.5.310.0330.08020.51
5.5.300.0100.05018.05
5.5.290.0000.04318.07
5.5.280.0100.08020.78
5.5.270.0070.08320.95
5.5.260.0070.03720.79
5.5.250.0230.03720.57
5.5.240.0030.08020.05
5.4.450.0700.06019.34
5.4.440.0200.05019.30
5.4.430.0200.04719.38
5.4.420.0070.06019.38
5.4.410.0130.05018.99
5.4.400.0700.06018.77
5.4.390.0430.05018.76
5.4.380.0470.05318.63
5.4.370.0200.04318.77
5.4.360.0130.05018.80
5.4.350.0150.06812.02
5.4.340.0240.06712.02
5.4.320.0060.03512.51
5.4.310.0060.03912.50
5.4.300.0060.04112.51
5.4.290.0090.03412.51
5.4.280.0050.03612.40
5.4.270.0070.03512.40
5.4.260.0060.03712.40
5.4.250.0070.05718.75
5.4.240.0130.07319.04
5.4.230.0030.05318.95
5.4.220.0100.05018.90
5.4.210.0170.04318.77
5.4.200.0130.04318.65
5.4.190.0130.04718.94
5.4.180.0200.06718.93
5.4.170.0130.04719.03
5.4.160.0030.06018.72
5.4.150.0000.06018.95
5.4.140.0030.05316.59
5.4.130.0100.06716.45
5.4.120.0130.05316.48
5.4.110.0070.05016.68
5.4.100.0100.04316.46
5.4.90.0000.05316.38
5.4.80.0070.04716.40
5.4.70.0030.05016.69
5.4.60.0070.04716.34
5.4.50.0030.05016.52
5.4.40.0070.05016.68
5.4.30.0070.05316.38
5.4.20.0070.04716.50
5.4.10.0030.05016.48
5.4.00.0030.05315.75
5.3.290.0060.03912.80
5.3.280.0100.04714.68
5.3.270.0100.05314.70
5.3.260.0100.05314.70
5.3.250.0070.05314.83
5.3.240.0100.04714.69
5.3.230.0070.04714.76
5.3.220.0100.05314.39
5.3.210.0000.06014.63
5.3.200.0130.04014.47
5.3.190.0070.05314.54
5.3.180.0070.04714.73
5.3.170.0030.05014.70
5.3.160.0100.05014.65
5.3.150.0130.06714.65
5.3.140.0030.05014.38
5.3.130.0000.05714.46
5.3.120.0100.05014.62
5.3.110.0070.05314.54
5.3.100.0130.04313.87
5.3.90.0170.03714.18
5.3.80.0000.05714.11
5.3.70.0070.07014.01
5.3.60.0030.05014.09
5.3.50.0000.05314.05
5.3.40.0070.05013.96
5.3.30.0030.05313.81
5.3.20.0030.05013.77
5.3.10.0070.07013.74
5.3.00.0070.06713.63
5.2.170.0070.04011.33
5.2.160.0000.04311.37
5.2.150.0100.03711.21
5.2.140.0030.04311.13
5.2.130.0130.04711.09
5.2.120.0070.05011.19
5.2.110.0000.05711.09
5.2.100.0030.05711.06
5.2.90.0130.04311.10
5.2.80.0170.03711.18
5.2.70.0070.05711.32
5.2.60.0030.04311.02
5.2.50.0100.04311.00
5.2.40.0070.04711.22
5.2.30.0070.05011.06
5.2.20.0100.04711.12
5.2.10.0100.03311.02
5.2.00.0030.04010.89
5.1.60.0170.03310.00
5.1.50.0100.03010.20
5.1.40.0030.0339.90
5.1.30.0070.03310.26
5.1.20.0030.05310.53
5.1.10.0070.0309.91
5.1.00.0000.05010.14
5.0.50.0000.0308.61
5.0.40.0070.0238.38
5.0.30.0000.0438.43
5.0.20.0030.0378.15
5.0.10.0000.0438.14
5.0.00.0000.0438.23
4.4.90.0100.0177.21
4.4.80.0000.0307.21
4.4.70.0030.0237.21
4.4.60.0070.0177.21
4.4.50.0000.0237.21
4.4.40.0000.0377.21
4.4.30.0070.0237.21
4.4.20.0100.0237.21
4.4.10.0070.0237.21
4.4.00.0030.0337.21
4.3.110.0070.0177.21
4.3.100.0000.0337.21
4.3.90.0030.0307.21
4.3.80.0030.0477.21
4.3.70.0030.0307.21
4.3.60.0030.0277.21
4.3.50.0000.0237.21
4.3.40.0000.0337.21
4.3.30.0070.0207.21
4.3.20.0030.0277.21
4.3.10.0030.0307.21
4.3.00.0100.0237.26

preferences:
48.09 ms | 401 KiB | 5 Q