3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); ini_set('display_errors', true); function by_ref(&$value) { echo "Call by ref value:\n"; var_dump($value); } function by_value($value) { echo "Call by value value:\n"; var_dump($value); } $thing = array(1,2); echo "Before call by ref:\n"; var_dump($thing); by_ref($thing[5][6]); echo "After call by ref:\n"; var_dump($thing); echo "Before call by value\n"; by_value($thing[7][8]); echo "After call by value:\n"; var_dump($thing); echo "Before call by ref again:\n"; by_ref($thing[7][8]); echo "After call by ref again:\n"; var_dump($thing);

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.55
8.3.50.0130.00622.05
8.3.40.0040.01118.97
8.3.30.0110.00420.20
8.3.20.0110.00420.39
8.3.10.0030.01421.95
8.3.00.0030.00522.45
8.2.180.0130.01016.63
8.2.170.0120.00322.96
8.2.160.0100.00320.43
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00320.64
8.2.110.0090.00019.31
8.2.100.0090.00317.88
8.2.90.0000.00819.34
8.2.80.0040.00419.41
8.2.70.0000.00817.63
8.2.60.0000.00818.05
8.2.50.0060.00318.07
8.2.40.0030.00917.93
8.2.30.0000.00719.34
8.2.20.0030.00617.73
8.2.10.0080.00017.61
8.2.00.0050.00317.71
8.1.280.0040.01125.92
8.1.270.0030.00523.99
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00423.92
8.1.230.0040.00720.97
8.1.220.0000.00818.77
8.1.210.0030.00619.03
8.1.200.0070.00317.23
8.1.190.0040.00417.29
8.1.180.0030.00518.10
8.1.170.0000.00818.64
8.1.160.0040.00418.71
8.1.150.0030.00518.61
8.1.140.0070.00017.40
8.1.130.0000.00717.89
8.1.120.0050.00317.42
8.1.110.0030.00317.39
8.1.100.0030.00517.29
8.1.90.0000.00717.24
8.1.80.0070.00017.27
8.1.70.0020.00517.38
8.1.60.0030.00517.60
8.1.50.0000.00717.54
8.1.40.0020.00517.50
8.1.30.0020.00517.54
8.1.20.0040.00417.68
8.1.10.0040.00417.55
8.1.00.0000.00917.53
8.0.300.0050.00219.87
8.0.290.0050.00317.16
8.0.280.0040.00418.39
8.0.270.0050.00317.29
8.0.260.0030.00316.95
8.0.250.0030.00317.00
8.0.240.0070.00316.93
8.0.230.0030.00316.83
8.0.220.0030.00316.82
8.0.210.0080.00016.95
8.0.200.0040.00416.99
8.0.190.0030.00516.87
8.0.180.0000.00816.93
8.0.170.0000.00816.90
8.0.160.0000.00716.86
8.0.150.0070.00016.87
8.0.140.0100.00016.72
8.0.130.0030.00313.40
8.0.120.0040.00416.94
8.0.110.0040.00416.91
8.0.100.0040.00416.78
8.0.90.0000.00816.81
8.0.80.0090.00616.90
8.0.70.0000.00716.79
8.0.60.0070.00016.80
8.0.50.0070.00016.96
8.0.30.0080.01117.13
8.0.20.0120.00817.40
8.0.10.0050.00216.93
8.0.00.0090.01016.88
7.4.330.0060.00014.97
7.4.320.0000.00616.47
7.4.300.0000.00616.67
7.4.290.0000.00816.46
7.4.280.0040.00416.53
7.4.270.0000.00616.64
7.4.260.0080.00013.23
7.4.250.0040.00416.47
7.4.240.0030.00316.58
7.4.230.0000.00716.32
7.4.220.0100.01016.48
7.4.210.0080.00916.57
7.4.200.0070.00016.50
7.4.190.0000.00816.65
7.4.160.0080.00816.31
7.4.150.0100.01017.40
7.4.140.0110.00617.86
7.4.130.0040.01316.68
7.4.120.0120.00816.43
7.4.110.0060.01316.61
7.4.100.0130.00516.64
7.4.90.0190.00416.51
7.4.80.0070.01819.39
7.4.70.0030.01316.46
7.4.60.0070.01016.49
7.4.50.0030.00516.65
7.4.40.0060.00622.77
7.4.30.0000.01916.57
7.4.00.0080.00814.68
7.3.330.0000.00513.31
7.3.320.0030.00313.34
7.3.310.0030.00516.31
7.3.300.0000.00816.38
7.3.290.0130.00716.35
7.3.280.0100.00916.36
7.3.270.0140.00417.40
7.3.260.0240.02116.29
7.3.250.0060.01416.48
7.3.240.0120.00316.36
7.3.230.0030.01616.44
7.3.210.0130.00616.48
7.3.200.0070.01319.39
7.3.190.0070.01116.35
7.3.180.0070.01016.35
7.3.170.0120.00616.56
7.3.160.0040.01516.30
7.3.120.0100.00314.81
7.2.330.0100.00816.61
7.2.320.0090.01316.45
7.2.310.0110.00716.38
7.2.300.0070.01016.43
7.2.290.0070.01016.48
7.2.00.0100.00319.08
7.1.100.0090.00918.15
7.1.70.0040.00417.27
7.1.60.0120.01219.21
7.1.50.0070.00717.05
7.1.00.0000.05322.37
7.0.200.0000.00816.56
7.0.140.0100.06722.15
7.0.60.0070.06719.87
7.0.50.0030.05017.87
7.0.40.0100.06020.13
7.0.30.0570.06320.25
7.0.20.0330.05720.12
7.0.10.0070.04720.16
7.0.00.0030.07320.23
5.6.280.0030.07021.10
5.6.210.0030.06020.61
5.6.200.0030.08318.14
5.6.190.0030.05020.57
5.6.180.4370.03720.64
5.6.170.0270.04320.62
5.6.160.0100.08020.57
5.6.150.0030.08018.14
5.6.140.0070.08318.28
5.6.130.0030.04318.15
5.6.120.0000.07321.04
5.6.110.0170.05321.12
5.6.100.0070.03721.14
5.6.90.0030.06720.88
5.6.80.0130.07320.41
5.6.70.3330.03720.52
5.5.350.0000.08020.37
5.5.340.0170.07318.10
5.5.330.0000.04720.21
5.5.320.0270.05020.47
5.5.310.0470.05320.30
5.5.300.0070.08017.96
5.5.290.0070.08317.95
5.5.280.0030.08720.77
5.5.270.0130.03320.80
5.5.260.0130.07720.83
5.5.250.0000.04320.76
5.5.240.0130.07020.07
5.4.450.1900.04319.41
5.4.440.1900.03319.36
5.4.430.2070.03719.41
5.4.420.1930.04019.45
5.4.410.2030.04319.42
5.4.400.2000.03719.17
5.4.390.2070.03719.00
5.4.380.2130.03718.87
5.4.370.2130.04019.19
5.4.360.2170.04719.06
5.4.350.1970.03719.08
5.4.340.1830.03719.20
5.4.320.2030.04019.24
5.4.310.2070.04319.31
5.4.300.2170.03719.15
5.4.290.2000.04318.86
5.4.280.2130.04718.88
5.4.270.2030.04719.13
5.4.260.2170.03319.14
5.4.250.2170.04319.21
5.4.240.2130.04319.07
5.4.230.2030.04319.13
5.4.220.2070.04018.84
5.4.210.2230.03318.86
5.4.200.2130.03718.98
5.4.190.2170.03719.21
5.4.180.2170.04718.94
5.4.170.2070.04318.84
5.4.160.2030.03019.07
5.4.150.2000.04319.29
5.4.140.1870.03316.71
5.4.130.1800.03716.45
5.4.120.1800.03716.37
5.4.110.1900.03016.63
5.4.100.1870.03716.61
5.4.90.2100.03716.33
5.4.80.1970.04016.28
5.4.70.1930.03016.49
5.4.60.1970.03716.54
5.4.50.1970.03716.48
5.4.40.1930.03716.43
5.4.30.2000.03016.52
5.4.20.2670.03016.48
5.4.10.1800.03316.53
5.4.00.1900.03315.75
5.3.290.1930.04014.78
5.3.280.2300.04314.67
5.3.270.1900.04014.72
5.3.260.1930.03714.59
5.3.250.1970.03314.60
5.3.240.1870.04014.53
5.3.230.1900.03714.52
5.3.220.2000.03014.48
5.3.210.1900.03714.64
5.3.200.1830.04714.50
5.3.190.0000.04014.49
5.3.180.0000.04014.49
5.3.170.0030.03314.63
5.3.160.0970.03714.79
5.3.150.1930.03314.48
5.3.140.1570.03314.78
5.3.130.2000.04714.46
5.3.120.2400.05014.71
5.3.110.1900.03714.64
5.3.100.1930.02714.03
5.3.90.1830.03313.95
5.3.80.2130.03313.94
5.3.70.2100.04014.11
5.3.60.1530.03314.23
5.3.50.0000.06314.07
5.3.40.0070.03314.18
5.3.30.0830.03013.83
5.3.20.2230.03713.85
5.3.10.2030.04013.57
5.3.00.1870.03313.87
5.2.170.1770.03011.08
5.2.160.1770.03311.30
5.2.150.1500.03011.06
5.2.140.1870.02711.20
5.2.130.1700.03311.02
5.2.120.1630.04311.02
5.2.110.1830.02711.11
5.2.100.1830.03311.11
5.2.90.1830.03311.06
5.2.80.1700.03711.00
5.2.70.1600.03011.32
5.2.60.1600.03310.95
5.2.50.1570.03311.03
5.2.40.1230.02711.22
5.2.30.1230.02710.89
5.2.20.1430.03310.89
5.2.10.1570.02310.87
5.2.00.1430.03310.69
5.1.60.1330.0239.93
5.1.50.1270.0239.88
5.1.40.1370.0279.91
5.1.30.1270.02010.31
5.1.20.1100.02710.44
5.1.10.1570.02710.13
5.1.00.1430.03310.05
5.0.50.0800.0308.68
5.0.40.0700.0278.30
5.0.30.0730.0408.16
5.0.20.0730.0208.18
5.0.10.0830.0278.16
5.0.00.0800.0478.07
4.4.90.0730.0178.07
4.4.80.0830.0238.07
4.4.70.0770.0278.07
4.4.60.0600.0208.07
4.4.50.0770.0238.07
4.4.40.0800.0338.07
4.4.30.0670.0108.07
4.4.20.0630.0178.07
4.4.10.0800.0178.07
4.4.00.0600.0238.07
4.3.110.0830.0208.07
4.3.100.0900.0138.07
4.3.90.0770.0138.07
4.3.80.0770.0278.07
4.3.70.0800.0238.07
4.3.60.0730.0208.07
4.3.50.0800.0178.07
4.3.40.0770.0408.07
4.3.30.0400.0278.07
4.3.20.0400.0238.07
4.3.10.0470.0238.07
4.3.00.0430.0238.07

preferences:
48.43 ms | 401 KiB | 5 Q