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; $_a = $test->getA(); var_dump([ 'original' => $test->getA(), 'shuffled' => shuffle($_a), 'result' => $_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.0120.00615.13
7.3.120.0030.01515.07
7.3.110.0030.01314.95
7.3.100.0030.01314.56
7.3.90.0060.00314.87
7.3.80.0060.00914.73
7.3.70.0100.00314.77
7.3.60.0080.00314.85
7.3.50.0080.00814.79
7.3.40.0060.01014.73
7.3.30.0000.01114.64
7.3.20.0060.01016.77
7.3.10.0080.00616.74
7.3.00.0060.00816.61
7.2.250.0030.01415.22
7.2.240.0110.00714.58
7.2.230.0000.01615.16
7.2.220.0070.01014.86
7.2.210.0060.00915.21
7.2.200.0070.01114.95
7.2.190.0100.00714.94
7.2.180.0040.01215.00
7.2.170.0030.01214.83
7.2.130.0030.01017.01
7.2.120.0080.00416.65
7.2.110.0040.01216.67
7.2.100.0130.00016.53
7.2.90.0090.00616.95
7.2.80.0000.01616.99
7.2.70.0060.00617.02
7.2.60.0030.01016.96
7.2.50.0000.01117.00
7.2.40.0030.01416.98
7.2.30.0040.00716.92
7.2.20.0030.00917.08
7.2.10.0030.01016.72
7.2.00.0060.00518.08
7.1.330.0120.00315.98
7.1.320.0130.00015.68
7.1.310.0030.01515.87
7.1.300.0000.00815.46
7.1.290.0070.01015.52
7.1.280.0060.00615.63
7.1.270.0000.01415.72
7.1.260.0100.00715.87
7.1.250.0040.01115.54
7.1.70.0040.00417.04
7.1.60.0140.01119.24
7.1.50.0090.01317.00
7.1.00.0030.04722.57
7.0.200.0000.00716.77
7.0.140.0070.06322.07
7.0.100.0470.07319.83
7.0.90.0430.07719.84
7.0.80.0500.07019.78
7.0.70.0430.07319.97
7.0.60.0330.08020.01
7.0.50.0370.08320.38
7.0.40.0070.07020.18
7.0.30.0030.05020.14
7.0.20.0130.04320.05
7.0.10.0100.07020.09
7.0.00.0100.08020.17
5.6.280.0030.07321.15
5.6.250.0100.07020.53
5.6.240.0130.08020.63
5.6.230.0200.07020.58
5.6.220.0030.09020.47
5.6.210.0030.08720.52
5.6.200.0130.05721.07
5.6.190.0070.08021.03
5.6.180.0170.07021.04
5.6.170.0100.06320.96
5.6.160.0130.07721.10
5.6.150.0100.07320.96
5.6.140.0030.08721.10
5.6.130.0100.07721.08
5.6.120.0030.08020.91
5.6.110.0030.06720.95
5.6.100.0100.07721.16
5.6.90.0070.06321.06
5.6.80.0100.08020.50
5.6.70.0100.07720.32
5.6.60.0030.08020.50
5.6.50.0100.04320.37
5.6.40.0100.07320.40
5.6.30.0030.04320.44
5.6.20.0070.08320.43
5.6.10.0070.07320.43
5.6.00.0030.06720.51
5.5.380.0000.05020.38
5.5.370.0170.07020.48
5.5.360.0100.08320.29
5.5.350.0370.05320.41
5.5.340.0070.08320.90
5.5.330.0100.07720.92
5.5.320.0130.08020.89
5.5.310.0070.08020.79
5.5.300.0130.06720.88
5.5.290.0130.06320.82
5.5.280.0100.08020.90
5.5.270.0070.06720.63
5.5.260.0070.07020.82
5.5.250.0130.07720.67
5.5.240.0200.06020.03
5.5.230.0070.07720.13
5.5.220.0070.07720.26
5.5.210.0130.06320.18
5.5.200.0130.07720.22
5.5.190.0030.07020.20
5.5.180.0100.06720.27
5.5.160.0100.06020.12
5.5.150.0100.07020.14
5.5.140.0100.06320.27
5.5.130.0000.08719.95
5.5.120.0070.08020.07
5.5.110.0100.08020.25
5.5.100.0030.09020.05
5.5.90.0030.06720.17
5.5.80.0070.08020.06
5.5.70.0100.07720.07
5.5.60.0130.06320.11
5.5.50.0000.08319.93
5.5.40.0070.05020.01
5.5.30.0000.08320.14
5.5.20.0100.07320.04
5.5.10.0170.06720.13
5.5.00.0170.07020.04
5.4.450.0100.07019.55
5.4.440.0100.05319.20
5.4.430.0130.07719.41
5.4.420.0070.08019.40
5.4.410.0100.08019.32
5.4.400.0100.07718.86
5.4.390.0100.07719.03
5.4.380.0030.08019.03
5.4.370.0030.08019.13
5.4.360.0130.06718.95
5.4.350.0100.06719.05
5.4.340.0100.06319.22
5.4.320.0130.06719.04
5.4.310.0030.05019.23
5.4.300.0030.05719.20
5.4.290.0170.06719.17
5.4.280.0100.06719.09
5.4.270.0070.06319.09
5.4.260.0100.07719.02
5.4.250.0070.07718.89
5.4.240.0070.08019.15
5.4.230.0070.08319.07
5.4.220.0130.04019.22
5.4.210.0030.07019.22
5.4.200.0130.06718.89
5.4.190.0100.07019.20
5.4.180.0100.06719.13
5.4.170.0130.06719.13
5.4.160.0100.07319.21
5.4.150.0030.08319.01
5.4.140.0070.06016.49
5.4.130.0030.08016.37
5.4.120.0030.05016.37
5.4.110.0100.06716.51
5.4.100.0070.07016.50
5.4.90.0130.07016.49
5.4.80.0030.07716.45
5.4.70.0070.07316.32
5.4.60.0070.06016.48
5.4.50.0000.05716.39
5.4.40.0070.05716.49
5.4.30.0100.07016.48
5.4.20.0030.07716.34
5.4.10.0070.07716.45
5.4.00.0100.06315.82
5.3.290.0030.08314.65
5.3.280.0170.07014.70
5.3.270.0130.06714.59
5.3.260.0100.07014.73
5.3.250.0070.08314.61
5.3.240.0070.05714.63
5.3.230.0100.07314.73
5.3.220.0030.06314.62
5.3.210.0100.07014.54
5.3.200.0170.06714.57
5.3.190.0070.08014.57
5.3.180.0070.06714.52
5.3.170.0070.06714.63
5.3.160.0100.07014.64
5.3.150.0170.06014.62
5.3.140.0030.04014.67
5.3.130.0130.07314.65
5.3.120.0070.08314.47
5.3.110.0100.06014.65
5.3.100.0000.04314.14
5.3.90.0070.05714.11
5.3.80.0030.06713.92
5.3.70.0070.07313.99
5.3.60.0030.07314.05
5.3.50.0070.05714.03
5.3.40.0130.06713.94
5.3.30.0030.06713.93
5.3.20.0070.07013.79
5.3.10.0070.04013.63
5.3.00.0070.07313.64
5.2.170.0100.06011.75
5.2.160.0000.06711.75
5.2.150.0070.06011.75
5.2.140.0000.06311.75
5.2.130.0030.06011.75
5.2.120.0070.06011.75
5.2.110.0000.05011.75
5.2.100.0100.05311.75
5.2.90.0100.05711.75
5.2.80.0030.06311.75
5.2.70.0030.06311.75
5.2.60.0100.05711.75
5.2.50.0030.06311.75
5.2.40.0000.03711.75
5.2.30.0030.04011.75
5.2.20.0000.06311.75
5.2.10.0170.04711.75
5.2.00.0070.05011.75
5.1.60.0030.05711.75
5.1.50.0070.05311.75
5.1.40.0070.03311.75
5.1.30.0000.04711.75
5.1.20.0070.05711.75
5.1.10.0030.05711.75
5.1.00.0030.06011.75
5.0.50.0000.04311.75
5.0.40.0070.02311.75
5.0.30.0000.06011.75
5.0.20.0070.03711.75
5.0.10.0030.04311.75
5.0.00.0030.06011.75
4.4.90.0070.02311.75
4.4.80.0100.03011.75
4.4.70.0000.02311.75
4.4.60.0100.03011.75
4.4.50.0030.03311.75
4.4.40.0100.04711.75
4.4.30.0000.03311.75
4.4.20.0070.03311.75
4.4.10.0000.04011.75
4.4.00.0030.05311.75
4.3.110.0000.03311.75
4.3.100.0000.04011.75
4.3.90.0070.01311.75
4.3.80.0000.05311.75
4.3.70.0100.02711.75
4.3.60.0070.02711.75
4.3.50.0070.02011.75
4.3.40.0030.05711.75
4.3.30.0000.03711.75
4.3.20.0000.04011.75
4.3.10.0030.03711.75
4.3.00.0100.02711.75

preferences:
38.37 ms | 401 KiB | 5 Q