3v4l.org

run code in 300+ PHP versions simultaneously
<?php function &test($a) { $empty = []; return isset($a) ? $a : $empty; } function &test2($a) { $empty = []; return ${isset($a) ? 'a' : 'empty'}; } $test =& test('123'); print_r($test); $test =& test2('123'); print_r($test); $test =& test(NULL); print_r($test); $test =& test2(NULL); print_r($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.0090.01218.30
8.3.50.0150.00621.14
8.3.40.0090.00618.83
8.3.30.0070.00718.96
8.3.20.0080.00020.20
8.3.10.0030.00521.76
8.3.00.0040.00419.24
8.2.180.0160.00618.13
8.2.170.0110.01122.96
8.2.160.0070.00720.35
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0020.00526.16
8.2.120.0040.00419.77
8.2.110.0080.00022.16
8.2.100.0040.01019.76
8.2.90.0040.00419.05
8.2.80.0060.00317.97
8.2.70.0090.00317.63
8.2.60.0060.00317.80
8.2.50.0000.00918.07
8.2.40.0030.00618.18
8.2.30.0050.00217.88
8.2.20.0030.00617.79
8.2.10.0040.00418.22
8.2.00.0000.00817.80
8.1.280.0070.01025.92
8.1.270.0040.00418.92
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0100.00023.96
8.1.230.0070.00419.17
8.1.220.0060.00317.76
8.1.210.0030.00518.77
8.1.200.0030.00617.48
8.1.190.0080.00017.35
8.1.180.0090.00019.01
8.1.170.0030.00618.64
8.1.160.0040.00418.89
8.1.150.0040.00418.95
8.1.140.0000.00717.39
8.1.130.0040.00417.70
8.1.120.0000.00717.30
8.1.110.0070.00017.50
8.1.100.0000.00817.46
8.1.90.0000.00717.44
8.1.80.0070.00017.49
8.1.70.0040.00417.36
8.1.60.0090.00017.56
8.1.50.0040.00417.57
8.1.40.0050.00317.40
8.1.30.0000.00817.66
8.1.20.0040.00417.61
8.1.10.0030.00517.44
8.1.00.0070.00417.27
8.0.300.0040.00418.77
8.0.290.0000.00717.05
8.0.280.0000.00818.48
8.0.270.0050.00217.17
8.0.260.0030.00317.17
8.0.250.0030.00317.04
8.0.240.0040.00416.99
8.0.230.0000.00716.98
8.0.220.0000.00816.86
8.0.210.0030.00316.88
8.0.200.0050.00316.90
8.0.190.0000.00717.01
8.0.180.0000.00716.86
8.0.170.0030.00316.85
8.0.160.0000.00717.00
8.0.150.0080.00016.91
8.0.140.0040.00416.93
8.0.130.0030.00313.31
8.0.120.0060.00316.92
8.0.110.0000.00716.89
8.0.100.0050.00216.94
8.0.90.0040.00416.82
8.0.80.0030.01216.88
8.0.70.0000.00716.99
8.0.60.0030.00316.75
8.0.50.0070.00017.06
8.0.30.0050.01517.01
8.0.20.0120.00717.40
8.0.10.0000.00817.02
8.0.00.0110.00616.74
7.4.330.0060.00015.15
7.4.320.0030.00316.61
7.4.300.0030.00316.45
7.4.290.0080.00016.61
7.4.280.0040.00416.48
7.4.270.0070.00016.61
7.4.260.0000.00716.57
7.4.250.0070.00016.42
7.4.240.0040.00416.53
7.4.230.0000.00616.61
7.4.220.0000.01816.60
7.4.210.0090.00516.68
7.4.200.0030.00316.44
7.4.160.0090.00616.31
7.4.150.0160.00317.40
7.4.140.0090.01117.86
7.4.130.0060.01016.64
7.4.120.0060.01116.53
7.4.110.0030.01416.37
7.4.100.0090.00916.65
7.4.90.0090.01316.35
7.4.80.0120.00619.39
7.4.70.0120.00616.43
7.4.60.0080.00816.62
7.4.50.0040.00416.46
7.4.40.0170.00316.61
7.4.30.0030.01316.73
7.4.00.0050.01214.84
7.3.330.0000.00613.33
7.3.320.0000.00513.13
7.3.310.0000.00716.28
7.3.300.0000.00716.32
7.3.290.0050.00916.27
7.3.280.0070.01216.29
7.3.270.0070.01017.40
7.3.260.0080.00816.38
7.3.250.0090.00916.47
7.3.240.0060.01616.59
7.3.230.0100.01316.60
7.3.210.0110.00616.42
7.3.200.0030.01719.39
7.3.190.0040.01216.51
7.3.180.0100.01316.52
7.3.170.0140.00416.41
7.3.160.0110.01116.35
7.3.120.0040.01514.73
7.3.110.0030.01314.75
7.3.100.0060.00614.81
7.3.90.0140.00314.75
7.3.80.0090.00614.84
7.3.70.0090.00314.53
7.3.60.0100.00714.80
7.3.50.0040.00814.67
7.3.40.0120.00314.97
7.3.30.0080.00014.73
7.3.20.0070.00716.72
7.3.10.0060.00916.63
7.3.00.0070.00716.61
7.2.330.0100.01116.76
7.2.320.0050.01716.62
7.2.310.0090.00916.35
7.2.300.0070.01316.52
7.2.290.0070.01116.43
7.2.250.0040.01515.01
7.2.240.0130.00615.05
7.2.230.0030.00715.22
7.2.220.0090.00615.07
7.2.210.0080.00815.08
7.2.200.0090.00915.04
7.2.190.0000.01414.97
7.2.180.0000.00914.77
7.2.170.0000.01215.05
7.2.60.0100.00316.82
7.2.00.0030.00919.34
7.1.330.0090.00415.79
7.1.320.0000.00915.85
7.1.310.0000.01315.53
7.1.300.0000.01315.88
7.1.290.0040.00815.78
7.1.280.0000.01315.83
7.1.270.0000.01315.51
7.1.260.0110.00415.77
7.1.200.0030.01015.91
7.1.100.0000.01317.65
7.1.70.0050.00317.21
7.1.60.0030.02119.22
7.1.50.0040.00816.86
7.1.00.0070.07022.34
7.0.200.0030.00716.88
7.0.140.0000.03722.09
7.0.60.0100.07719.88
7.0.50.0030.08317.82
7.0.40.0030.04720.40
7.0.30.0230.03720.23
7.0.20.0300.06320.06
7.0.10.0070.04020.10
7.0.00.0070.04720.06
5.6.280.0070.07020.78
5.6.210.0000.09020.76
5.6.200.0070.08318.19
5.6.190.0130.08720.64
5.6.180.0230.08020.61
5.6.170.0330.06020.47
5.6.160.0070.07320.44
5.6.150.0070.05718.14
5.6.140.0070.08318.21
5.6.130.0070.08018.17
5.6.120.0000.06321.02
5.6.110.0170.07020.97
5.6.100.0070.08321.05
5.6.90.0170.06021.11
5.6.80.0100.07720.38
5.6.70.0230.04020.41
5.5.350.0000.07720.47
5.5.340.0100.08017.92
5.5.330.0100.08320.25
5.5.320.0330.06720.27
5.5.310.0170.05020.51
5.5.300.0030.07718.07
5.5.290.0000.08717.98
5.5.280.0030.04020.87
5.5.270.0070.08320.79
5.5.260.0070.06720.85
5.5.250.0100.06720.55
5.5.240.0000.06720.07
5.4.450.0130.06019.30
5.4.440.0900.04019.40
5.4.430.0700.06019.68
5.4.420.0930.05319.23
5.4.410.0630.05719.38
5.4.400.0800.04719.11
5.4.390.0570.05718.99
5.4.380.0070.06318.47
5.4.370.0200.05018.63
5.4.360.0100.06018.57
5.4.350.0200.05318.71
5.4.340.0130.06018.72
5.4.320.0170.06018.69
5.4.310.0200.05318.74
5.4.300.0200.06318.59
5.4.290.0270.05018.84
5.4.280.0230.05318.49
5.4.270.0170.05318.60
5.4.260.0130.05318.53
5.4.250.0170.06718.80
5.4.240.0200.07718.46
5.4.230.0130.08018.45
5.4.220.0170.08018.77
5.4.210.0370.05718.73
5.4.200.0170.07316.59
5.4.190.0400.05318.61
5.4.180.0270.06718.61
5.4.170.0270.07018.59
5.4.160.0230.07318.76
5.4.150.0200.07018.60
5.4.140.0170.07716.25
5.4.130.0270.06716.30
5.4.120.0270.06716.29
5.4.110.0170.07316.33
5.4.100.0200.07316.25
5.4.90.0100.08316.22
5.4.80.0130.07316.28
5.4.70.0230.07016.44
5.4.60.0270.06016.17
5.4.50.0100.08016.40
5.4.40.0200.07016.23
5.4.30.0300.05716.24
5.4.20.0230.07016.38
5.4.10.0130.07016.26
5.4.00.0230.06015.80
5.3.290.0300.06314.84
5.3.280.0100.08014.64
5.3.270.0200.07314.71
5.3.260.0230.07014.66
5.3.250.0230.07014.59
5.3.240.0200.07014.71
5.3.230.0130.07714.62
5.3.220.0170.07014.73
5.3.210.0230.06714.60
5.3.200.0200.07014.63
5.3.190.0270.06014.70
5.3.180.0200.07014.58
5.3.170.0230.06714.63
5.3.160.0170.07014.61
5.3.150.0170.07314.60
5.3.140.0170.07314.74
5.3.130.0170.07014.59
5.3.120.0130.06014.67
5.3.110.0200.05014.77
5.3.100.0130.05714.21
5.3.90.0130.05314.14
5.3.80.0030.06314.06
5.3.70.0170.05014.00
5.3.60.0200.05314.03
5.3.50.0130.05013.98
5.3.40.0170.05014.06
5.3.30.0200.04714.01
5.3.20.0170.05013.80
5.3.10.0030.06313.66
5.3.00.0170.06013.65
5.2.170.0270.03011.14
5.2.160.0130.04311.20
5.2.150.0130.04311.16
5.2.140.0100.04711.18
5.2.130.0070.04711.20
5.2.120.0170.04011.17
5.2.110.0170.04311.15
5.2.100.0200.03711.16
5.2.90.0030.04711.10
5.2.80.0070.04711.16
5.2.70.0130.04311.08
5.2.60.0170.04711.14
5.2.50.0070.06011.11
5.2.40.0170.03710.98
5.2.30.0100.04310.99
5.2.20.0130.04311.03
5.2.10.0030.05310.91
5.2.00.0130.04310.92
5.1.60.0100.03710.02
5.1.50.0100.03710.09
5.1.40.0170.02710.00
5.1.30.0130.03710.31
5.1.20.0070.05010.41
5.1.10.0130.04010.25
5.1.00.0130.03310.20
5.0.50.0070.0308.53
5.0.40.0130.0238.54
5.0.30.0100.0438.43
5.0.20.0070.0278.24
5.0.10.0030.0308.25
5.0.00.0070.0438.30
4.4.90.0070.0276.23
4.4.80.0030.0236.24
4.4.70.0070.0206.24
4.4.60.0030.0236.24
4.4.50.0030.0236.24
4.4.40.0100.0306.24
4.4.30.0000.0276.24
4.4.20.0000.0376.24
4.4.10.0030.0276.24
4.4.00.0030.0406.24
4.3.110.0100.0206.24
4.3.100.0030.0276.24
4.3.90.0000.0276.24
4.3.80.0000.0406.24
4.3.70.0070.0206.24
4.3.60.0070.0206.24
4.3.50.0070.0206.24
4.3.40.0030.0376.24
4.3.30.0030.0236.24
4.3.20.0000.0236.24
4.3.10.0100.0176.24
4.3.00.0030.0277.60

preferences:
57.41 ms | 401 KiB | 5 Q