3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getArray() { return [1, 2, 3]; } function squareArray(array &$a) { foreach ($a as &$v) { $v **= 2; } } // Generates a warning in PHP 7. squareArray((getArray()));

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.70.0000.00717.51
8.1.60.0070.00017.48
8.1.50.0040.00417.46
8.1.40.0000.00817.48
8.1.30.0030.00617.68
8.1.20.0040.00417.53
8.1.10.0060.00317.46
8.1.00.0000.00817.54
8.0.200.0040.00417.03
8.0.190.0040.00416.96
8.0.180.0040.00416.87
8.0.170.0070.00016.92
8.0.160.0030.00316.88
8.0.150.0030.00316.88
8.0.140.0040.00416.80
8.0.130.0080.00013.36
8.0.120.0000.00716.87
8.0.110.0000.00717.06
8.0.100.0040.00416.98
8.0.90.0040.00416.90
8.0.80.0100.00316.92
8.0.70.0050.00216.89
8.0.60.0070.00016.83
8.0.50.0040.00416.83
8.0.30.0120.00617.06
8.0.20.0110.00817.40
8.0.10.0000.00717.02
8.0.00.0080.00816.65
7.4.300.0070.00016.63
7.4.290.0050.00216.50
7.4.280.0050.00316.48
7.4.270.0030.00616.64
7.4.260.0000.00816.49
7.4.250.0000.00716.45
7.4.240.0030.00316.55
7.4.230.0000.00716.60
7.4.220.0060.01216.55
7.4.210.0060.01316.49
7.4.200.0040.00416.50
7.4.160.0190.00716.61
7.4.150.0100.01017.40
7.4.140.0130.00617.86
7.4.130.0110.00816.54
7.4.120.0100.01016.55
7.4.110.0070.01116.59
7.4.100.0090.00916.59
7.4.90.0100.01016.43
7.4.80.0130.00519.39
7.4.70.0100.00716.43
7.4.60.0070.01016.65
7.4.50.0070.00516.54
7.4.40.0030.01416.52
7.4.30.0130.01016.57
7.4.00.0090.00614.68
7.3.330.0060.00013.32
7.3.320.0000.00613.29
7.3.310.0040.00316.36
7.3.300.0000.00716.36
7.3.290.0080.00816.33
7.3.280.0080.00716.35
7.3.270.0120.00617.40
7.3.260.0140.00816.37
7.3.250.0100.00916.47
7.3.240.0080.01016.42
7.3.230.0120.00416.54
7.3.210.0140.00716.43
7.3.200.0090.00916.36
7.3.190.0110.00416.43
7.3.180.0110.01216.49
7.3.170.0130.01016.33
7.3.160.0110.00516.44
7.3.40.0130.00714.47
7.3.30.0030.00914.53
7.3.20.0080.00816.60
7.3.10.0040.00716.73
7.3.00.0070.00716.36
7.2.330.0200.00316.56
7.2.320.0060.01216.55
7.2.310.0090.00616.50
7.2.300.0100.01316.68
7.2.290.0050.01016.40
7.2.170.0100.01014.68
7.2.160.0100.00015.05
7.2.150.0090.01316.86
7.2.140.0030.01116.66
7.2.130.0030.01016.73
7.2.120.0090.01016.93
7.2.110.0030.01016.90
7.2.100.0060.00616.57
7.2.90.0120.00316.99
7.2.80.0050.00516.61
7.2.70.0090.00316.76
7.2.60.0050.01216.97
7.2.50.0060.00916.94
7.2.40.0040.00816.88
7.2.30.0130.00016.68
7.2.20.0110.01116.92
7.2.10.0030.01016.75
7.2.00.0130.00616.94
7.1.280.0120.00915.50
7.1.270.0130.00715.65
7.1.260.0090.00315.52
7.1.250.0000.01215.45
7.1.240.0120.00915.73
7.1.230.0120.00015.52
7.1.220.0000.01415.39
7.1.210.0070.01315.63
7.1.200.0070.00515.66
7.1.190.0060.00615.39
7.1.180.0070.01515.67
7.1.170.0110.00015.61
7.1.160.0130.00015.60
7.1.150.0120.00015.23
7.1.140.0070.01815.36
7.1.130.0130.00915.57
7.1.120.0070.00715.30
7.1.110.0090.01215.68
7.1.100.0100.01115.57
7.1.90.0140.00415.80
7.1.80.0150.00915.51
7.1.70.0040.00816.47
7.1.60.0060.00516.31
7.1.50.0100.01416.11
7.1.40.0100.01325.13
7.1.30.0130.01424.98
7.1.20.0130.01124.90
7.1.10.0060.00916.04
7.1.00.0050.01316.06
7.0.330.0040.00815.25
7.0.320.0200.01015.16
7.0.310.0160.01014.99
7.0.300.0080.00515.08
7.0.290.0190.00314.91
7.0.280.0040.01314.74
7.0.270.0100.00515.05
7.0.260.0110.01115.02
7.0.250.0180.00415.07
7.0.240.0120.00315.00
7.0.230.0100.00615.04
7.0.220.0130.01115.16
7.0.210.0200.00614.94
7.0.200.0090.00815.81
7.0.190.0090.00614.96
7.0.180.0060.01315.72
7.0.170.0070.01315.50
7.0.160.0080.00915.51
7.0.150.0080.01015.61
7.0.140.0080.01315.66
7.0.130.0060.00915.76
7.0.120.0070.00915.92
7.0.110.0080.01015.63
7.0.100.0060.00915.55
7.0.90.0020.01415.61
7.0.80.0090.00715.74
7.0.70.0070.01015.57
7.0.60.0080.00815.57
7.0.50.0080.01115.68
7.0.40.0080.01215.73
7.0.30.0080.01115.63
7.0.20.0070.00815.83
7.0.10.0020.01715.62
7.0.00.0080.01415.63
5.6.400.0000.01214.02
5.6.390.0120.00414.15
5.6.380.0150.00014.23
5.6.370.0210.01014.55
5.6.360.0150.00614.27
5.6.350.0140.01114.39
5.6.340.0220.00414.30
5.6.330.0090.00914.15
5.6.320.0240.01014.21
5.6.310.0170.00014.52
5.6.300.0080.03917.48
5.6.290.0150.03417.44
5.6.280.0080.04217.55
5.6.270.0200.02817.53
5.6.260.0120.03417.59
5.6.250.0160.02917.68
5.6.240.0100.04517.48
5.6.230.0100.04517.56
5.6.220.0130.03817.52
5.6.210.0150.03617.39
5.6.200.0170.03717.61
5.6.190.0190.03217.43
5.6.180.0170.03317.64
5.6.170.0200.03117.50
5.6.160.0150.03817.61
5.6.150.0110.03617.44
5.6.140.0180.04917.53
5.6.130.0190.02917.51
5.6.120.0130.03317.51
5.6.110.0060.03717.58
5.6.100.0100.03517.38
5.6.90.0130.03117.66
5.6.80.0130.03917.28
5.6.70.0150.03417.18
5.6.60.0130.03317.13
5.6.50.0140.04817.39
5.6.40.0140.04817.18
5.6.30.0180.04317.10
5.6.20.0130.04817.00
5.6.10.0120.04017.08
5.6.00.0190.04117.18
5.5.380.0170.00514.08
5.5.370.0110.01414.21
5.5.360.0140.01414.00
5.5.350.0160.00513.88
5.5.340.0210.00914.07
5.5.330.0160.00713.96
5.5.320.0230.00014.20
5.5.310.0110.01914.09
5.5.300.0220.00913.69
5.5.290.0190.00414.17
5.5.280.0120.00613.79
5.5.270.0110.01414.12
5.5.260.0160.01213.72
5.5.250.0170.01413.92
5.5.240.0190.00713.71
5.5.230.0130.00813.76
5.5.220.0110.01114.13
5.5.210.0160.01213.75
5.5.200.0240.00313.73
5.5.190.0230.00813.71
5.5.180.0100.01913.48
5.5.170.0170.00714.08
5.5.160.0210.00613.90
5.5.150.0170.01014.08
5.5.140.0160.00814.09
5.5.130.0070.01214.08
5.5.120.0180.00013.63
5.5.110.0060.01213.91
5.5.100.0200.00614.03
5.5.90.0190.01414.10
5.5.80.0150.01513.96
5.5.70.0270.00014.02
5.5.60.0190.00713.95
5.5.50.0100.00713.93
5.5.40.0140.00813.64
5.5.30.0080.01213.75
5.5.20.0080.01213.79
5.5.10.0210.00013.79
5.5.00.0090.01013.71
5.4.450.0070.01111.81
5.4.440.0070.00711.81
5.4.430.0160.00711.81
5.4.420.0100.01011.81
5.4.410.0040.01211.81
5.4.400.0080.01011.81
5.4.390.0060.00711.81
5.4.380.0070.00511.81
5.4.370.0130.00711.81
5.4.360.0120.01211.81
5.4.350.0100.00711.81
5.4.340.0120.00611.81
5.4.330.0100.00711.81
5.4.320.0210.00011.81
5.4.310.0150.00011.81
5.4.300.0110.00311.81
5.4.290.0050.00511.81
5.4.280.0120.00611.81
5.4.270.0120.00911.81
5.4.260.0130.00011.81
5.4.250.0080.01211.81
5.4.240.0130.00611.81
5.4.230.0100.00311.81
5.4.220.0090.00511.81
5.4.210.0080.00811.81
5.4.200.0100.00311.81
5.4.190.0060.00711.81
5.4.180.0140.00011.81
5.4.170.0070.00711.81
5.4.160.0080.00511.81
5.4.150.0100.00511.81
5.4.140.0100.00511.81
5.4.130.0090.00511.81
5.4.120.0130.00411.81
5.4.110.0100.00511.81
5.4.100.0100.00511.81
5.4.90.0070.00711.81
5.4.80.0100.00311.81
5.4.70.0080.00511.81
5.4.60.0080.00511.81
5.4.50.0060.00611.81
5.4.40.0170.00011.81
5.4.30.0100.00311.81
5.4.20.0120.00311.81
5.4.10.0110.00611.81
5.4.00.0120.00411.81
5.3.290.0110.00511.81
5.3.280.0070.00711.81
5.3.270.0090.00611.81
5.3.260.0130.00011.81
5.3.250.0120.00311.81
5.3.240.0100.00311.81
5.3.230.0050.01411.81
5.3.220.0000.01311.81
5.3.210.0070.00711.81
5.3.200.0070.00711.81
5.3.190.0040.00911.81
5.3.180.0090.00611.81
5.3.170.0100.00411.81
5.3.160.0060.00611.81
5.3.150.0110.00011.81
5.3.140.0060.00611.81
5.3.130.0070.00511.81
5.3.120.0090.00311.81
5.3.110.0080.00611.81
5.3.100.0130.00011.81
5.3.90.0120.00011.81
5.3.80.0120.00011.81
5.3.70.0100.00611.81
5.3.60.0000.01211.81
5.3.50.0080.00811.81
5.3.40.0030.00911.81
5.3.30.0130.00011.81
5.3.20.0090.00411.81
5.3.10.0080.01111.81
5.3.00.0120.00011.81
5.2.170.0060.00611.81
5.2.160.0070.00311.81
5.2.150.0070.00311.81
5.2.140.0080.00311.81
5.2.130.0090.00611.81
5.2.120.0080.00811.81
5.2.110.0060.00611.81
5.2.100.0090.00611.81
5.2.90.0070.00411.81
5.2.80.0110.00011.81
5.2.70.0050.00511.81
5.2.60.0110.00011.81
5.2.50.0090.00611.81
5.2.40.0110.00011.81
5.2.30.0060.00611.81
5.2.20.0080.00511.81
5.2.10.0160.00011.81
5.2.00.0060.00311.81
5.1.60.0040.00411.81
5.1.50.0060.00311.81
5.1.40.0110.00011.81
5.1.30.0080.00311.81
5.1.20.0070.01011.81
5.1.10.0120.00311.81
5.1.00.0070.00211.81
5.0.50.0110.00011.81
5.0.40.0000.00611.81
5.0.30.0070.00011.81
5.0.20.0080.00011.81
5.0.10.0060.00211.81
5.0.00.0040.00411.81
4.4.90.0000.00511.81
4.4.80.0030.00311.81
4.4.70.0060.00611.81
4.4.60.0040.00211.81
4.4.50.0050.00311.81
4.4.40.0040.00711.81
4.4.30.0070.00611.81
4.4.20.0000.00611.81
4.4.10.0000.01011.81
4.4.00.0060.00011.81
4.3.110.0040.00311.81
4.3.100.0030.00211.81
4.3.90.0050.00311.81
4.3.80.0030.00311.81
4.3.70.0070.00011.81
4.3.60.0090.00011.81
4.3.50.0060.00011.81
4.3.40.0050.00511.81
4.3.30.0040.00211.81
4.3.20.0030.00211.81
4.3.10.0000.00611.81
4.3.00.0000.00611.81

preferences:
13.29 ms | 406 KiB | 5 Q