3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static $c = 100; public static function &D() { return self::$c; } } echo A::$c; //prints 100 $cRef1 =& A::D(); $cRef1 = 200; echo A::$c; //prints 200 $a = new ReflectionClass('A'); $d = $a->getMethod('D'); $cRef2 =& $d->invoke(null); //DOES NOT RETURN REFERENCE!!! $cRef2 = 300; echo A::$c; //prints 200

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.1.100.0040.00417.34
8.1.90.0060.00317.39
8.1.80.0040.00417.46
8.1.70.0060.00317.32
8.1.60.0050.00317.46
8.1.50.0000.00817.58
8.1.40.0040.00417.41
8.1.30.0030.00517.64
8.1.20.0000.00817.57
8.1.10.0050.00317.57
8.1.00.0040.00417.50
8.0.230.0050.00316.96
8.0.220.0000.00816.79
8.0.210.0030.00316.96
8.0.200.0030.00316.96
8.0.190.0000.00716.95
8.0.180.0070.00016.79
8.0.170.0000.00816.88
8.0.160.0000.00816.86
8.0.150.0000.00716.82
8.0.140.0030.00316.87
8.0.130.0000.00513.26
8.0.120.0040.00416.88
8.0.110.0040.00416.77
8.0.100.0070.00016.73
8.0.90.0050.00316.96
8.0.80.0050.01316.91
8.0.70.0040.00416.78
8.0.60.0030.00516.96
8.0.50.0040.00416.87
8.0.30.0090.01016.97
8.0.20.0110.00817.40
8.0.10.0040.00417.00
8.0.00.0070.01016.57
7.4.300.0000.00616.50
7.4.290.0020.00516.60
7.4.280.0040.00416.64
7.4.270.0070.00016.58
7.4.260.0000.00816.50
7.4.250.0040.00416.46
7.4.240.0070.00016.53
7.4.230.0030.00316.59
7.4.220.0040.00416.69
7.4.210.0020.01316.44
7.4.200.0030.00316.72
7.4.160.0090.00816.38
7.4.140.0110.01017.86
7.4.130.0100.01116.56
7.4.120.0100.00816.50
7.4.110.0100.00716.46
7.4.100.0160.00016.35
7.4.90.0110.00716.62
7.4.80.0160.00319.39
7.4.70.0070.01116.36
7.4.60.0100.01016.46
7.4.50.0070.01016.55
7.4.40.0160.00716.65
7.4.10.0080.00715.07
7.4.00.0050.01214.90
7.3.330.0030.00313.19
7.3.320.0030.00313.24
7.3.310.0070.00016.38
7.3.300.0030.00316.32
7.3.290.0030.00316.23
7.3.280.0100.00916.34
7.3.260.0140.00616.37
7.3.240.0110.00616.36
7.3.230.0120.00616.20
7.3.210.0130.01016.34
7.3.200.0140.00616.37
7.3.190.0100.00716.50
7.3.180.0060.00916.30
7.3.170.0120.00416.30
7.3.160.0100.00716.31
7.3.130.0080.00914.83
7.3.120.0100.00814.59
7.3.110.0080.01014.87
7.3.100.0090.00614.67
7.3.90.0060.00814.72
7.3.80.0070.00814.59
7.3.70.0030.00914.83
7.3.60.0080.00714.83
7.3.50.0030.01314.67
7.3.40.0060.00814.69
7.3.30.0070.00914.91
7.3.20.0080.00616.53
7.3.10.0050.00916.47
7.3.00.0090.00616.65
7.2.330.0100.01016.31
7.2.320.0030.01716.81
7.2.310.0170.00016.30
7.2.300.0090.00616.63
7.2.290.0100.00916.83
7.2.260.0110.00614.95
7.2.250.0070.00915.11
7.2.240.0090.00515.18
7.2.230.0100.00615.15
7.2.220.0000.01214.92
7.2.210.0060.00414.90
7.2.200.0090.00314.88
7.2.190.0030.01314.96
7.2.180.0030.01314.96
7.2.170.0040.00815.00
7.2.160.0020.00714.84
7.2.150.0060.00816.88
7.2.140.0100.00517.09
7.2.130.0070.00816.86
7.2.120.0020.01116.91
7.2.110.0100.00516.91
7.2.100.0060.00916.89
7.2.90.0050.00616.82
7.2.80.0050.01016.87
7.2.70.0160.00716.41
7.2.60.0100.01016.50
7.2.50.0110.00916.49
7.2.40.0150.00616.46
7.2.30.0120.00616.56
7.2.20.0100.00916.61
7.2.10.0090.00816.42
7.2.00.0310.00716.37
7.1.330.0070.00715.67
7.1.320.0090.00515.75
7.1.310.0040.00815.94
7.1.300.0050.00915.64
7.1.290.0020.01115.57
7.1.280.0080.00515.41
7.1.270.0000.01215.60
7.1.260.0070.00615.68
7.1.250.0060.00615.68
7.1.240.0110.00415.54
7.1.230.0050.01015.64
7.1.220.0050.00915.55
7.1.210.0060.00715.74
7.1.200.0050.00515.48
7.1.190.0030.00915.69
7.1.180.0100.00215.71
7.1.170.0130.01114.96
7.1.160.0130.00914.84
7.1.150.0150.00715.04
7.1.140.0120.00614.88
7.1.130.0130.00915.08
7.1.120.0140.00514.99
7.1.110.0140.00515.08
7.1.100.0100.00615.05
7.1.90.0080.00815.01
7.1.80.0120.00915.15
7.1.70.0120.00814.96
7.1.60.0200.01021.03
7.1.50.0220.01021.00
7.1.40.0220.01021.04
7.1.30.0240.00820.79
7.1.20.0180.01221.01
7.1.10.0170.00614.82
7.1.00.0100.00715.02
7.0.330.0060.00815.55
7.0.320.0040.00615.17
7.0.310.0080.00715.20
7.0.300.0140.00914.59
7.0.290.0120.01114.80
7.0.280.0060.00615.30
7.0.270.0170.00414.68
7.0.260.0120.00614.70
7.0.250.0140.00714.79
7.0.240.0130.00814.74
7.0.230.0130.00714.69
7.0.220.0130.00814.65
7.0.210.0130.00914.68
7.0.200.0130.00514.80
7.0.190.0130.00814.83
7.0.180.0160.00614.77
7.0.170.0120.00614.73
7.0.160.0140.00714.85
7.0.150.0160.00614.59
7.0.140.0130.00714.75
7.0.130.0130.00614.70
7.0.120.0120.00514.62
7.0.110.0130.00614.75
7.0.100.0230.00414.56
7.0.90.0130.00714.73
7.0.80.0120.00614.72
7.0.70.0090.00914.73
7.0.60.0090.01014.54
7.0.50.0100.00614.74
7.0.40.0140.00313.43
7.0.30.0110.00613.44
7.0.20.0120.00713.49
7.0.10.0100.01013.42
7.0.00.0110.00713.42
5.6.400.0050.01014.34
5.6.390.0050.00814.41
5.6.380.0090.00514.30
5.6.370.0030.00914.15
5.6.360.0050.01014.36
5.6.350.0040.00814.32
5.6.340.0030.01014.29
5.6.330.0020.01114.26
5.6.320.0020.00914.47
5.6.310.0050.00914.29
5.6.300.0090.00313.99
5.6.290.0110.00514.34
5.6.280.0040.01214.38
5.6.270.0060.00714.33
5.6.260.0060.00714.46
5.6.250.0050.00814.21
5.6.240.0060.00914.32
5.6.230.0080.00714.24
5.6.220.0030.01114.22
5.6.210.0070.00814.33
5.6.200.0040.00914.25
5.6.190.0040.01014.29
5.6.180.0100.00414.18
5.6.170.0060.00714.28
5.6.160.0030.00814.39
5.6.150.0110.00414.24
5.6.140.0090.00814.25
5.6.130.0060.00814.12
5.6.120.0070.00614.46
5.6.110.0070.00614.39
5.6.100.0060.00814.27
5.6.90.0110.00514.30
5.6.80.0070.00914.15
5.6.70.0080.00614.24
5.6.60.0070.00814.14
5.6.50.0070.00914.06
5.6.40.0050.01214.11
5.6.30.0070.00714.11
5.6.20.0110.00514.24
5.6.10.0090.00614.30
5.6.00.0100.00614.16
5.5.380.0040.01111.17
5.5.370.0060.00811.29
5.5.360.0000.01310.87
5.5.350.0060.01211.12
5.5.340.0140.00011.30
5.5.330.0130.00011.07
5.5.320.0120.00311.19
5.5.310.0160.00011.07
5.5.300.0100.00711.18
5.5.290.0140.00510.87
5.5.280.0090.00911.04
5.5.270.0110.00510.91
5.5.260.0100.00711.34
5.5.250.0140.00311.16
5.5.240.0140.00310.79
5.5.230.0070.00711.14
5.5.220.0080.00811.20
5.5.210.0130.00011.07
5.5.200.0050.01111.22
5.5.190.0090.00810.96
5.5.180.0130.00011.03
5.5.160.0060.01010.89
5.5.150.0040.00911.04
5.5.140.0110.00310.95
5.5.130.0090.00511.12
5.5.120.0100.00710.96
5.5.110.0120.00611.25
5.5.100.0080.00811.10
5.5.90.0080.00511.11
5.5.80.0040.00910.96
5.5.70.0110.00310.81
5.5.60.0030.01311.21
5.5.50.0100.00511.05
5.5.40.0110.00510.92
5.5.30.0110.00311.17
5.5.20.0150.00310.98
5.5.10.0040.01410.89
5.5.00.0090.00910.81
5.4.450.0120.00511.08
5.4.440.0120.00410.86
5.4.430.0140.00011.03
5.4.420.0050.01010.74
5.4.410.0150.00011.06
5.4.400.0110.00210.80
5.4.390.0060.00611.16
5.4.380.0080.00810.97
5.4.370.0070.00811.15
5.4.360.0110.00410.98
5.4.350.0030.01011.00
5.4.340.0130.00011.11
5.4.320.0060.00610.64
5.4.310.0100.00310.78
5.4.300.0090.00810.91
5.4.290.0100.00311.08
5.4.280.0060.01310.82
5.4.270.0000.01810.77
5.4.260.0120.00511.09
5.4.250.0080.00511.16
5.4.240.0110.00410.99
5.4.230.0100.00611.14
5.4.220.0150.00010.79
5.4.210.0170.00010.73
5.4.200.0090.00610.75
5.4.190.0140.00510.87
5.4.180.0100.00810.98
5.4.170.0100.01610.59
5.4.160.0080.01211.00
5.4.150.0150.00510.82
5.4.140.0090.00710.93
5.4.130.0110.00910.95
5.4.120.0070.01010.94
5.4.110.0090.00911.02
5.4.100.0160.00011.27
5.4.90.0110.00711.14
5.4.80.0170.00410.90
5.4.70.0130.00010.74
5.4.60.0100.00711.04
5.4.50.0090.00910.90
5.4.40.0090.00911.11
5.4.30.0130.00311.13
5.4.20.0150.00010.96
5.4.10.0100.00511.13
5.4.00.0050.01010.89
5.3.290.0080.00410.66
5.3.280.0130.00010.50
5.3.270.0090.00510.38
5.3.260.0180.00410.56
5.3.250.0100.00710.65
5.3.240.0130.00610.43
5.3.230.0090.00910.50
5.3.220.0120.00310.25
5.3.210.0160.00310.36
5.3.200.0120.00610.31
5.3.190.0140.00610.59
5.3.180.0000.01710.34
5.3.170.0070.00810.64
5.3.160.0120.00610.67
5.3.150.0080.00810.63
5.3.140.0130.00410.64
5.3.130.0100.00810.43
5.3.120.0070.00710.60
5.3.110.0100.00310.66
5.3.100.0060.00610.61
5.3.90.0100.00510.66
5.3.80.0060.00910.55
5.3.70.0130.00210.18
5.3.60.0070.00710.35
5.3.50.0110.00810.52
5.3.40.0160.00010.50
5.3.30.0070.00710.61
5.3.20.0060.00610.28
5.3.10.0100.00210.09
5.3.00.0120.00310.31
5.2.170.0070.0049.55
5.2.160.0070.0079.26
5.2.150.0060.0069.29
5.2.140.0100.0059.51
5.2.130.0110.0059.48
5.2.120.0060.0069.45
5.2.110.0100.0009.38
5.2.100.0110.0009.20
5.2.90.0090.0039.30
5.2.80.0100.0039.35
5.2.70.0060.0069.31
5.2.60.0050.0099.25
5.2.50.0040.0089.31
5.2.40.0070.0079.51
5.2.30.0120.0009.23
5.2.20.0060.0099.04
5.2.10.0070.0079.09
5.2.00.0080.0049.09
5.1.60.0040.0088.86
5.1.50.0040.0078.86
5.1.40.0060.0038.86
5.1.30.0110.0008.86
5.1.20.0060.0068.86
5.1.10.0120.0008.86
5.1.00.0090.0038.86
5.0.50.0020.0088.86
5.0.40.0040.0048.86
5.0.30.0000.0078.86
5.0.20.0040.0048.86
5.0.10.0040.0048.86
5.0.00.0050.0058.86
4.4.90.0000.0088.86
4.4.80.0000.0098.86
4.4.70.0040.0048.86
4.4.60.0000.0088.86
4.4.50.0000.0088.86
4.4.40.0040.0048.86
4.4.30.0000.0088.86
4.4.20.0070.0008.86
4.4.10.0090.0008.86
4.4.00.0000.0078.86
4.3.110.0060.0008.86
4.3.100.0000.0068.86
4.3.90.0050.0028.86
4.3.80.0040.0048.86
4.3.70.0030.0038.86
4.3.60.0040.0048.86
4.3.50.0000.0088.86
4.3.40.0000.0088.86
4.3.30.0050.0028.86
4.3.20.0060.0008.86
4.3.10.0070.0008.86
4.3.00.0000.0078.86

preferences:
14.11 ms | 406 KiB | 5 Q