3v4l.org

run code in 300+ PHP versions simultaneously
<?php function modify_in_place($prices) { $prices[0] = 100; } function modify_location($prices) { $prices = [40, 50, 60]; } $prices = [1, 2, 3]; modify_in_place($prices); assert($prices[0] === 100); //failed! pass-by-value $prices = [1, 2, 3]; modify_location($prices); assert($prices[0] === 40); //failed! pass-by-value

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.0180.00316.63
8.3.50.0030.01716.25
8.3.40.0120.00318.75
8.3.30.0070.00718.84
8.3.20.0030.00620.06
8.3.10.0040.00421.64
8.3.00.0060.00319.81
8.2.180.0070.01416.75
8.2.170.0120.00322.96
8.2.160.0100.00320.57
8.2.150.0050.00325.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0090.00017.50
8.2.110.0030.00622.07
8.2.100.0090.00317.63
8.2.90.0030.00519.04
8.2.80.0000.00917.97
8.2.70.0090.00017.63
8.2.60.0040.00417.92
8.2.50.0050.00518.07
8.2.40.0040.00421.11
8.2.30.0030.00519.78
8.2.20.0050.00317.76
8.2.10.0040.00417.95
8.2.00.0030.00618.07
8.1.280.0070.00725.92
8.1.270.0090.00620.33
8.1.260.0020.00526.35
8.1.250.0040.00428.09
8.1.240.0100.00722.50
8.1.230.0110.00017.48
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0080.00017.10
8.1.180.0040.00418.10
8.1.170.0040.00418.50
8.1.160.0060.00321.89
8.1.150.0070.00018.68
8.1.140.0050.00317.33
8.1.130.0030.00317.65
8.1.120.0000.00717.35
8.1.110.0000.00717.43
8.1.100.0080.00017.41
8.1.90.0000.00717.37
8.1.80.0040.00417.29
8.1.70.0080.00017.37
8.1.60.0000.00717.50
8.1.50.0040.00417.58
8.1.40.0060.00317.51
8.1.30.0040.00717.66
8.1.20.0040.00417.59
8.1.10.0000.00717.60
8.1.00.0030.00517.42
8.0.300.0070.00018.77
8.0.290.0000.00816.75
8.0.280.0000.00718.39
8.0.270.0030.00517.21
8.0.260.0000.00617.21
8.0.250.0040.00416.83
8.0.240.0030.00317.00
8.0.230.0000.00716.84
8.0.220.0000.00716.80
8.0.210.0000.00716.88
8.0.200.0000.00616.81
8.0.190.0030.00516.95
8.0.180.0000.00716.90
8.0.170.0080.00016.83
8.0.160.0000.00716.95
8.0.150.0070.00016.93
8.0.140.0050.00316.76
8.0.130.0000.00513.30
8.0.120.0040.00416.83
8.0.110.0050.00316.88
8.0.100.0080.00016.75
8.0.90.0070.00016.79
8.0.80.0030.01716.82
8.0.70.0000.00716.71
8.0.60.0000.00716.94
8.0.50.0050.00216.70
8.0.30.0100.00817.30
8.0.20.0140.00817.40
8.0.10.0040.00416.93
8.0.00.0120.00516.62
7.4.330.0000.00615.08
7.4.320.0000.00616.63
7.4.300.0030.00316.49
7.4.290.0070.00016.54
7.4.280.0090.00016.64
7.4.270.0000.00716.41
7.4.260.0000.00716.60
7.4.250.0080.00016.44
7.4.240.0040.00316.53
7.4.230.0030.00316.63
7.4.220.0030.01416.36
7.4.210.0070.01016.57
7.4.200.0030.00316.41
7.4.160.0130.00616.34
7.4.150.0000.01817.40
7.4.140.0120.00817.86
7.4.130.0060.01116.50
7.4.120.0130.00516.58
7.4.110.0030.01416.54
7.4.100.0170.00416.66
7.4.90.0000.01716.59
7.4.80.0130.00619.39
7.4.70.0090.00916.57
7.4.60.0070.01416.49
7.4.50.0030.00516.66
7.4.40.0100.01316.60
7.4.30.0120.00616.65
7.4.00.0100.00714.83
7.3.330.0030.00313.35
7.3.320.0000.00513.40
7.3.310.0000.00616.39
7.3.300.0040.00416.34
7.3.290.0070.00716.38
7.3.280.0100.00816.40
7.3.270.0110.00617.40
7.3.260.0130.00716.62
7.3.250.0090.00916.48
7.3.240.0160.00916.35
7.3.230.0130.00716.68
7.3.210.0130.00316.48
7.3.200.0110.00616.43
7.3.190.0060.01016.64
7.3.180.0090.00616.49
7.3.170.0000.01616.39
7.3.160.0140.00316.30
7.3.120.0080.00914.95
7.3.110.0050.00714.76
7.3.100.0020.01114.87
7.3.90.0080.00714.76
7.3.80.0050.00914.95
7.3.70.0030.01314.77
7.3.60.0030.00814.69
7.3.50.0030.01314.72
7.3.40.0090.00514.76
7.3.30.0060.00414.76
7.3.20.0060.00916.71
7.3.10.0050.00916.63
7.3.00.0060.00816.57
7.2.330.0090.00916.55
7.2.320.0030.01916.39
7.2.310.0140.00316.79
7.2.300.0120.01416.52
7.2.290.0010.00116.42
7.2.250.0100.01015.29
7.2.240.0070.00915.00
7.2.230.0080.00515.01
7.2.220.0080.00815.00
7.2.210.0100.00514.97
7.2.200.0080.00615.04
7.2.190.0070.00914.96
7.2.180.0090.00615.12
7.2.170.0060.00914.83
7.2.160.0070.01115.14
7.2.150.0140.00316.86
7.2.140.0030.01016.88
7.2.130.0100.00716.54
7.2.120.0070.01017.01
7.2.110.0080.00416.65
7.2.100.0120.00316.85
7.2.90.0090.00917.05
7.2.80.0060.00816.88
7.2.70.0060.00916.87
7.2.60.0100.00616.78
7.2.50.0030.01016.72
7.2.40.0030.01217.02
7.2.30.0090.00616.97
7.2.20.0060.00616.94
7.2.10.0120.00316.87
7.2.00.0080.00818.22
7.1.330.0000.01215.74
7.1.320.0070.00515.70
7.1.310.0050.00815.73
7.1.300.0050.00815.84
7.1.290.0030.01015.86
7.1.280.0080.00815.60
7.1.270.0090.00815.75
7.1.260.0050.00815.72
7.1.250.0070.00715.80
7.1.200.0040.00815.75
7.1.100.0040.01118.38
7.1.70.0030.00317.27
7.1.60.0030.02120.03
7.1.50.0090.01516.93
7.1.00.0030.07322.35
7.0.200.0070.00714.94
7.0.60.0130.09020.07
7.0.50.0030.08317.89
7.0.40.0100.04720.20
7.0.30.0230.06020.24
7.0.20.0300.07020.19
7.0.10.0000.08720.21
7.0.00.0100.07320.24
5.6.280.0000.07320.90
5.6.210.0070.08320.65
5.6.200.0070.08018.18
5.6.190.0070.05020.55
5.6.180.0130.07320.46
5.6.170.0270.08720.52
5.6.160.0130.07320.34
5.6.150.0030.08718.23
5.6.140.0070.07318.21
5.6.130.0130.04318.14
5.6.120.0030.09021.00
5.6.110.0000.08721.05
5.6.100.0200.06321.11
5.6.90.0170.05021.08
5.6.80.0000.04320.51
5.6.70.4430.04320.38
5.5.350.0130.04320.40
5.5.340.0000.04717.93
5.5.330.0000.04320.42
5.5.320.0300.07320.29
5.5.310.0300.05720.56
5.5.300.0070.03717.95
5.5.290.0000.08717.98
5.5.280.0070.04020.87
5.5.270.0100.07020.89
5.5.260.0030.04020.76
5.5.250.0030.08020.61
5.5.240.0170.06720.37
5.4.450.0100.06019.20
5.4.440.0170.05719.34
5.4.430.0100.05719.15
5.4.420.0200.05319.45
5.4.410.0130.05719.41
5.4.400.0270.04319.14
5.4.390.0170.05719.15
5.4.380.0230.04719.27
5.4.370.0170.06319.06
5.4.360.0230.05319.01
5.4.350.0430.04719.30
5.4.340.0130.06318.88
5.4.320.0270.05019.29
5.4.310.0100.05719.14
5.4.300.0200.04719.01
5.4.290.0200.05719.14
5.4.280.0230.05318.84
5.4.270.0070.06019.14
5.4.260.0130.05319.14
5.4.250.0100.05719.36
5.4.240.0170.05319.21
5.4.230.0200.05019.27
5.4.220.0030.06319.14
5.4.210.0270.04319.14
5.4.200.0170.05719.14
5.4.190.0200.05719.14
5.4.180.0370.03319.05
5.4.170.0230.04719.27
5.4.160.0230.05019.26
5.4.150.0200.05019.25
5.4.140.0200.04716.55
5.4.130.0170.04716.79
5.4.120.0270.03716.56
5.4.110.0200.04716.32
5.4.100.0170.05016.48
5.4.90.0200.04316.47
5.4.80.0100.05316.43
5.4.70.0030.07016.39
5.4.60.0230.04016.43
5.4.50.0100.06316.38
5.4.40.0370.03316.48
5.4.30.0130.03716.42
5.4.20.0230.04016.16

preferences:
88.89 ms | 400 KiB | 5 Q