3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $a = [1, 2, 3, 4, 5]; public function getA() { return $this->a; } } //$a = [1, 2, 3, 4, 5]; $test = new Test; $_a = $test->getA(); //shuffle($a); shuffle($_a); var_dump([ 'original' => $test->getA(), 'result _a' => $_a, //'result a' => $a, ]);

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)
7.4.00.0130.00614.67
7.3.120.0000.01814.88
7.3.110.0040.01414.53
7.3.100.0070.01014.86
7.3.90.0070.00714.87
7.3.80.0090.00614.86
7.3.70.0100.00314.95
7.3.60.0070.01014.82
7.3.50.0030.01015.03
7.3.40.0030.01314.78
7.3.30.0000.01414.78
7.3.20.0090.00616.70
7.3.10.0070.00316.71
7.3.00.0070.00716.65
7.2.250.0120.00815.28
7.2.240.0070.01415.12
7.2.230.0040.01114.88
7.2.220.0070.01015.11
7.2.210.0090.00615.15
7.2.200.0140.00315.16
7.2.190.0090.00614.80
7.2.180.0060.00915.02
7.2.170.0030.01314.72
7.2.160.0100.00314.89
7.2.150.0150.00016.80
7.2.140.0060.00916.91
7.2.130.0030.01316.86
7.2.120.0070.01016.94
7.2.110.0080.00316.66
7.2.100.0070.00716.82
7.2.90.0070.00716.75
7.2.80.0030.00617.05
7.2.70.0090.00616.96
7.2.60.0000.00917.01
7.2.50.0070.01016.76
7.2.40.0000.01317.00
7.2.30.0070.00416.87
7.2.20.0070.00716.98
7.2.10.0060.00916.79
7.2.00.0070.00717.91
7.1.330.0090.00916.02
7.1.320.0080.00815.69
7.1.310.0070.00716.01
7.1.300.0120.00315.80
7.1.290.0070.00715.73
7.1.280.0070.00715.82
7.1.270.0070.00715.61
7.1.260.0060.00915.77
7.1.250.0100.00715.79
7.1.240.0060.00815.85
7.1.230.0110.00715.73
7.1.220.0110.00415.84
7.1.210.0130.00315.88
7.1.200.0030.00715.80
7.1.190.0100.00315.81
7.1.180.0090.00615.67
7.1.170.0070.01015.73
7.1.160.0030.01015.73
7.1.150.0070.00715.76
7.1.140.0030.01315.70
7.1.130.0000.01015.75
7.1.120.0030.01015.86
7.1.110.0060.00615.77
7.1.100.0110.00015.79
7.1.90.0040.00815.65
7.1.80.0100.00315.87
7.1.70.0050.00516.37
7.1.60.0110.00817.46
7.1.50.0110.00716.37
7.1.40.0000.01115.63
7.1.30.0070.00315.47
7.1.20.0040.00815.93
7.1.10.0040.01115.75
7.1.00.0070.03219.12
7.0.330.0030.01015.32
7.0.320.0040.00415.43
7.0.310.0060.00315.58
7.0.300.0000.01415.39
7.0.290.0070.00715.47
7.0.280.0120.00315.34
7.0.270.0030.01015.43
7.0.260.0100.00315.05
7.0.250.0000.01215.41
7.0.240.0000.01415.40
7.0.230.0000.01115.33
7.0.220.0030.01015.48
7.0.210.0030.01015.16
7.0.200.0060.00516.00
7.0.190.0060.00315.38
7.0.180.0030.01015.50
7.0.170.0070.00315.60
7.0.160.0060.00615.16
7.0.150.0000.00915.34
7.0.140.0030.04218.75
7.0.130.0030.00615.54
7.0.120.0110.00415.23
7.0.110.0040.01115.38
7.0.100.0030.01015.35
7.0.90.0220.04617.69
7.0.80.0230.03117.70
7.0.70.0340.03817.58
7.0.60.0270.04117.70
7.0.50.0260.02517.98
7.0.40.0150.03616.77
7.0.30.0080.04816.61
7.0.20.0070.02716.79
7.0.10.0060.03016.78
7.0.00.0100.04516.77
5.6.400.0080.00414.54
5.6.390.0090.00614.22
5.6.380.0090.00614.55
5.6.370.0140.00014.65
5.6.360.0070.01014.46
5.6.350.0080.00014.25
5.6.340.0070.01014.34
5.6.330.0070.00614.15
5.6.320.0000.01114.27
5.6.310.0030.00914.39
5.6.300.0120.00014.01
5.6.290.0130.00314.52
5.6.280.0060.03817.56
5.6.270.0000.01414.50
5.6.260.0080.00414.43
5.6.250.0030.01214.38
5.6.240.0080.00814.21
5.6.230.0110.04017.56
5.6.220.0040.02917.49
5.6.210.0130.03717.59
5.6.200.0070.03017.64
5.6.190.0020.02917.78
5.6.180.0030.04917.69
5.6.170.0080.03517.67
5.6.160.0130.03217.56
5.6.150.0050.03317.77
5.6.140.0090.03717.68
5.6.130.0070.03317.78
5.6.120.0090.03917.71
5.6.110.0130.04317.71
5.6.100.0050.04617.53
5.6.90.0070.04617.81
5.6.80.0100.03817.37
5.6.70.0020.04417.26
5.6.60.0030.03117.29
5.6.50.0090.03717.39
5.6.40.0080.04217.34
5.6.30.0050.03217.25
5.6.20.0020.02917.35
5.6.10.0080.03717.21
5.6.00.0020.04217.39
5.5.380.0000.01514.13
5.5.370.0050.04517.32
5.5.360.0070.04517.42
5.5.350.0120.02717.48
5.5.340.0090.03217.44
5.5.330.0070.02517.53
5.5.320.0070.04417.57
5.5.310.0070.04217.43
5.5.300.0100.04317.47
5.5.290.0030.04717.66
5.5.280.0040.02617.58
5.5.270.0030.04817.63
5.5.260.0050.03317.40
5.5.250.0080.04217.38
5.5.240.0090.04217.30
5.5.230.0070.02217.19
5.5.220.0140.02517.24
5.5.210.0070.03317.27
5.5.200.0110.03917.22
5.5.190.0020.03417.18
5.5.180.0100.04017.15
5.5.170.0030.01014.25
5.5.160.0070.04217.13
5.5.150.0070.04217.23
5.5.140.0020.05017.14
5.5.130.0080.04017.16
5.5.120.0070.04317.11
5.5.110.0050.03716.97
5.5.100.0060.03417.06
5.5.90.0050.04617.13
5.5.80.0070.04316.94
5.5.70.0070.03217.09
5.5.60.0050.02617.16
5.5.50.0140.02017.19
5.5.40.0070.04117.15
5.5.30.0100.03017.20
5.5.20.0110.02517.08
5.5.10.0030.05217.16
5.5.00.0000.05117.09
5.4.450.0040.04515.21
5.4.440.0130.03715.29
5.4.430.0040.03115.20
5.4.420.0030.04015.12
5.4.410.0050.02515.19
5.4.400.0070.04215.15
5.4.390.0050.03215.14
5.4.380.0050.02015.13
5.4.370.0030.04515.07
5.4.360.0020.04415.05
5.4.350.0080.03715.18
5.4.340.0090.03715.04
5.4.330.0040.00411.05
5.4.320.0090.03815.05
5.4.310.0050.03415.00
5.4.300.0050.03415.11
5.4.290.0080.02915.05
5.4.280.0050.04115.04
5.4.270.0080.04215.04
5.4.260.0050.04415.06
5.4.250.0070.03414.97
5.4.240.0060.03815.05
5.4.230.0020.04015.15
5.4.220.0090.03515.04
5.4.210.0070.03914.97
5.4.200.0110.02015.04
5.4.190.0030.04315.04
5.4.180.0060.04115.09
5.4.170.0100.03114.96
5.4.160.0020.04614.99
5.4.150.0070.04014.95
5.4.140.0070.04213.74
5.4.130.0050.03413.72
5.4.120.0030.02813.74
5.4.110.0050.03513.70
5.4.100.0100.02013.76
5.4.90.0060.03113.78
5.4.80.0070.02313.77
5.4.70.0060.03013.74
5.4.60.0050.04313.75
5.4.50.0050.03213.69
5.4.40.0070.03913.82
5.4.30.0050.04013.75
5.4.20.0050.03613.72
5.4.10.0100.03313.73
5.4.00.0080.03713.52
5.3.290.0050.04012.83
5.3.280.0050.04312.87
5.3.270.0100.02712.84
5.3.260.0070.03812.84
5.3.250.0060.03712.86
5.3.240.0080.02812.79
5.3.230.0030.04912.87
5.3.220.0070.03812.80
5.3.210.0040.03012.80
5.3.200.0070.03512.78
5.3.190.0030.02912.86
5.3.180.0020.03612.78
5.3.170.0120.03712.83
5.3.160.0100.03712.88
5.3.150.0080.02712.77
5.3.140.0070.03812.86
5.3.130.0100.03512.77
5.3.120.0090.03612.83
5.3.110.0110.03612.80
5.3.100.0020.03812.76
5.3.90.0030.02612.76
5.3.80.0060.04112.76
5.3.70.0020.04312.76
5.3.60.0050.03212.76
5.3.50.0020.03412.76
5.3.40.0070.04012.76
5.3.30.0070.03512.76
5.3.20.0050.02712.76
5.3.10.0030.03912.76
5.3.00.0030.03712.76
5.2.170.0000.07014.48
5.2.160.0000.05314.48
5.2.150.0100.05714.48
5.2.140.0100.05314.48
5.2.130.0030.06314.48
5.2.120.0000.06314.48
5.2.110.0000.06714.48
5.2.100.0030.04014.48
5.2.90.0130.05714.48
5.2.80.0100.05014.48
5.2.70.0070.04014.48
5.2.60.0070.05314.48
5.2.50.0000.03314.48
5.2.40.0070.02314.48
5.2.30.0070.06014.48
5.2.20.0100.05714.48
5.2.10.0070.05314.48
5.2.00.0070.05714.48
5.1.60.0100.05014.48
5.1.50.0070.02714.48
5.1.40.0000.04014.48
5.1.30.0070.04714.48
5.1.20.0070.05714.48
5.1.10.0130.05014.48
5.1.00.0070.03314.48
5.0.50.0030.05014.48
5.0.40.0070.04314.48
5.0.30.0030.07014.48
5.0.20.0030.02714.48
5.0.10.0070.03314.48
5.0.00.0100.04014.48
4.4.90.0000.03014.48
4.4.80.0000.02314.48
4.4.70.0070.03314.48
4.4.60.0000.04014.48
4.4.50.0030.03314.48
4.4.40.0030.04314.48
4.4.30.0030.03314.48
4.4.20.0070.03014.48
4.4.10.0000.03714.48
4.4.00.0000.04714.48
4.3.110.0000.03714.48
4.3.100.0000.02314.48
4.3.90.0070.03014.48
4.3.80.0070.05314.48
4.3.70.0030.03314.48
4.3.60.0030.02714.48
4.3.50.0030.03714.48
4.3.40.0000.04314.48
4.3.30.0030.03314.48
4.3.20.0000.03714.48
4.3.10.0000.02314.48
4.3.00.0070.03314.48

preferences:
35.1 ms | 401 KiB | 5 Q