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; } } $test = new Test; var_dump([ 'original' => $test->getA(), 'shuffled' => shuffle($test->getA()), 'result' => $test->getA(), ]);

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.3.10.0030.00916.68
7.3.00.0080.00016.73
7.2.130.0040.00716.77
7.2.120.0060.01016.85
7.2.110.0060.00916.90
7.2.100.0060.00316.71
7.2.90.0120.00416.95
7.2.80.0000.01216.73
7.2.70.0090.00616.81
7.2.60.0060.00916.87
7.2.50.0030.01016.66
7.2.40.0070.00716.61
7.2.30.0000.01016.80
7.2.20.0030.00616.74
7.2.10.0120.00016.73
7.2.00.0000.01117.98
7.1.250.0000.01115.74
7.1.70.0070.00016.97
7.1.60.0070.01719.40
7.1.50.0100.01016.93
7.1.00.0000.06022.28
7.0.200.0030.00316.84
7.0.140.0070.06722.01
7.0.120.0000.03322.11
7.0.60.0070.05020.05
7.0.50.0000.04317.84
7.0.40.0030.04017.80
7.0.30.0070.03717.76
7.0.20.0030.05317.80
7.0.10.0030.04017.83
7.0.00.0000.04317.68
5.6.280.0000.07720.82
5.6.210.0070.08020.44
5.6.200.0000.04318.13
5.6.190.0100.03318.28
5.6.180.0070.03718.29
5.6.170.0100.03318.18
5.6.160.0030.03718.19
5.6.150.0000.04018.14
5.6.140.0030.04318.18
5.6.130.0030.04018.11
5.6.120.0030.04018.23
5.6.110.0070.03718.14
5.6.100.0000.04718.16
5.6.90.0070.03718.15
5.6.80.0000.04017.62
5.6.70.0000.04017.65
5.6.60.0130.03017.66
5.6.50.0030.04717.50
5.6.40.0070.08017.63
5.6.30.0170.06017.57
5.6.20.0100.07017.58
5.6.10.0100.04017.63
5.6.00.0030.04017.48
5.5.350.0430.06320.39
5.5.340.0070.03718.04
5.5.330.0000.04018.03
5.5.320.0030.04017.98
5.5.310.0030.03717.95
5.5.300.0070.03717.91
5.5.290.0000.04318.07
5.5.280.0030.04017.99
5.5.270.0030.04017.94
5.5.260.0130.03717.91
5.5.250.0030.05317.91
5.5.240.0030.03717.40
5.5.230.0070.03317.43
5.5.220.0030.03717.33
5.5.210.0030.03717.36
5.5.200.0030.04017.36
5.5.190.0130.07017.44
5.5.180.0030.05717.38
5.5.160.0130.07017.29
5.5.150.0100.07317.36
5.5.140.0100.07317.32
5.5.130.0100.03317.41
5.5.120.0100.04017.29
5.5.110.0070.07717.38
5.5.100.0170.06717.21
5.5.90.0170.06317.19
5.5.80.0030.06717.16
5.5.70.0030.05717.19
5.5.60.0130.06717.19
5.5.50.0130.04717.16
5.5.40.0170.07017.20
5.5.30.0000.07017.25
5.5.20.0000.08717.28
5.5.10.0070.04717.23
5.5.00.0100.07317.18
5.4.450.0130.03019.36
5.4.440.0070.03319.34
5.4.430.0000.04019.30
5.4.420.0000.04019.35
5.4.410.0070.03319.14
5.4.400.0070.03319.13
5.4.390.0000.04019.02
5.4.380.0000.04019.13
5.4.370.0070.03718.95
5.4.360.0000.06319.01
5.4.350.0130.06019.05
5.4.340.0100.07319.05
5.4.320.0000.05319.04
5.4.310.0100.06719.01
5.4.300.0100.07018.88
5.4.290.0100.07719.09
5.4.280.0030.06318.95
5.4.270.0100.07718.88
5.4.260.0130.06319.01
5.4.250.0030.08319.04
5.4.240.0100.07719.09
5.4.230.0030.07018.94
5.4.220.0130.04319.01
5.4.210.0230.06019.26
5.4.200.0030.07718.88
5.4.190.0070.06719.02
5.4.180.0170.06319.05
5.4.170.0100.05319.09
5.4.160.0070.07719.11
5.4.150.0030.08018.93
5.4.140.0130.06716.43
5.4.130.0030.04016.43
5.4.120.0070.08016.30
5.4.110.0100.06016.23
5.4.100.0070.07716.48
5.4.90.0030.04316.45
5.4.80.0030.07316.51
5.4.70.0070.05716.36
5.4.60.0070.06716.41
5.4.50.0070.06016.27
5.4.40.0030.06016.48
5.4.30.0070.07316.35
5.4.20.0070.07316.52
5.4.10.0000.08316.51
5.4.00.0000.07015.83
5.3.290.0130.03714.88
5.3.280.0070.07014.61
5.3.270.0100.07314.64
5.3.260.0070.03714.59
5.3.250.0000.08014.55
5.3.240.0070.07314.70
5.3.230.0100.06314.59
5.3.220.0070.08014.77
5.3.210.0030.07714.59
5.3.200.0100.04014.52
5.3.190.0100.07714.56
5.3.180.0070.07714.58
5.3.170.0000.05714.57
5.3.160.0000.08014.59
5.3.150.0130.06714.59
5.3.140.0130.06314.56
5.3.130.0070.06714.60
5.3.120.0100.07714.62
5.3.110.0100.07314.58
5.3.100.0030.07314.07
5.3.90.0000.05713.86
5.3.80.0070.03714.04
5.3.70.0030.03714.04
5.3.60.0030.03714.05
5.3.50.0030.03713.79
5.3.40.0130.07313.98
5.3.30.0100.07013.98
5.3.20.0030.05313.58
5.3.10.0070.06713.65
5.3.00.0030.07713.47
5.2.170.0000.03711.04
5.2.160.0100.05011.24
5.2.150.0070.06011.17
5.2.140.0070.03711.11
5.2.130.0030.03711.10
5.2.120.0070.05711.15
5.2.110.0030.06311.00
5.2.100.0130.05311.08
5.2.90.0030.06010.98
5.2.80.0100.04011.09
5.2.70.0070.05011.11
5.2.60.0000.05711.10
5.2.50.0030.04310.86
5.2.40.0070.05711.05
5.2.30.0100.06010.95
5.2.20.0100.05710.99
5.2.10.0030.06310.89
5.2.00.0030.06010.71
5.1.60.0070.04710.02
5.1.50.0000.0279.99
5.1.40.0030.05710.00
5.1.30.0030.04010.29
5.1.20.0070.05010.42
5.1.10.0070.05310.07
5.1.00.0030.02310.11
5.0.50.0000.0408.61
5.0.40.0030.0278.23
5.0.30.0030.0308.31
5.0.20.0000.0238.15
5.0.10.0100.0378.23
5.0.00.0000.0678.20
4.4.90.0000.0237.31
4.4.80.0070.0337.31
4.4.70.0000.0377.31
4.4.60.0000.0407.31
4.4.50.0030.0337.31
4.4.40.0000.0307.31
4.4.30.0000.0277.31
4.4.20.0030.0277.31
4.4.10.0070.0307.31
4.4.00.0070.0307.31
4.3.110.0000.0307.31
4.3.100.0000.0207.31
4.3.90.0000.0237.31
4.3.80.0030.0537.31
4.3.70.0000.0377.31
4.3.60.0070.0277.31
4.3.50.0030.0277.31
4.3.40.0000.0377.31
4.3.30.0030.0377.31
4.3.20.0030.0337.31
4.3.10.0030.0237.31
4.3.00.0070.0307.31

preferences:
37.84 ms | 400 KiB | 5 Q