3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { protected $arr; public function __construct() { $this->arr = array(); } public function getArr() { return $this->arr; } public function append($arr) { $this->arr[] = $arr; } public function merge($arr) { $this->arr = array_merge($this->arr, $arr); } } $arr = array('a','b'); $obj = new MyClass(); $obj->append($arr);//使用append无法修改类属性 var_dump($obj->getArr()); //output : //array(0){} $obj->merge($arr);//使用merge可以 var_dump($obj->getArr()); //output: //array(2){'a','b'}

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.0040.01118.28
8.3.50.0130.00822.12
8.3.40.0120.00318.84
8.3.30.0120.00319.17
8.3.20.0080.00020.20
8.3.10.0000.00820.54
8.3.00.0040.00417.36
8.2.180.0180.00416.88
8.2.170.0110.00322.96
8.2.160.0070.00720.35
8.2.150.0080.00025.66
8.2.140.0000.00824.66
8.2.130.0030.00526.16
8.2.120.0080.00022.24
8.2.110.0000.00922.20
8.2.100.0060.00617.88
8.2.90.0000.00922.20
8.2.80.0090.00019.66
8.2.70.0040.00417.80
8.2.60.0000.00918.16
8.2.50.0040.00418.10
8.2.40.0000.00719.48
8.2.30.0040.00419.14
8.2.20.0040.00417.58
8.2.10.0070.00018.06
8.2.00.0060.00317.61
8.1.280.0060.00925.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0110.00020.72
8.1.230.0080.00420.89
8.1.220.0000.00817.74
8.1.210.0000.00918.90
8.1.200.0060.00317.35
8.1.190.0080.00017.23
8.1.180.0030.00718.10
8.1.170.0060.00318.46
8.1.160.0040.00418.75
8.1.150.0040.00418.76
8.1.140.0050.00317.44
8.1.130.0000.00717.76
8.1.120.0040.00417.38
8.1.110.0000.00817.33
8.1.100.0030.00317.25
8.1.90.0000.00717.31
8.1.80.0050.00217.46
8.1.70.0040.00417.25
8.1.60.0100.00017.55
8.1.50.0050.00517.54
8.1.40.0080.00017.52
8.1.30.0040.00417.65
8.1.20.0030.00517.68
8.1.10.0000.00717.56
8.1.00.0070.00317.51
8.0.300.0070.00019.83
8.0.290.0000.00816.63
8.0.280.0020.00518.31
8.0.270.0050.00217.11
8.0.260.0060.00017.19
8.0.250.0000.00816.95
8.0.240.0000.00716.95
8.0.230.0000.00716.79
8.0.220.0030.00316.85
8.0.210.0030.00316.86
8.0.200.0030.00316.84
8.0.190.0070.00016.88
8.0.180.0000.00716.77
8.0.170.0000.00916.93
8.0.160.0000.00716.75
8.0.150.0030.00316.84
8.0.140.0050.00216.69
8.0.130.0000.00613.20
8.0.120.0060.00316.80
8.0.110.0040.00416.82
8.0.100.0040.00416.77
8.0.90.0000.00716.93
8.0.80.0080.00816.88
8.0.70.0070.00016.80
8.0.60.0020.00516.71
8.0.50.0000.00716.69
8.0.30.0070.01417.06
8.0.20.0080.01117.40
8.0.10.0000.00816.81
8.0.00.0110.01016.74
7.4.330.0050.00015.03
7.4.320.0050.00316.45
7.4.300.0030.00316.60
7.4.290.0000.00816.60
7.4.280.0070.00016.41
7.4.270.0000.00716.54
7.4.260.0030.00316.50
7.4.250.0040.00416.54
7.4.240.0020.00516.45
7.4.230.0040.00416.32
7.4.220.0000.03016.63
7.4.210.0070.00716.64
7.4.200.0050.00316.72
7.4.160.0080.00816.52
7.4.150.0160.00317.40
7.4.140.0080.01017.86
7.4.130.0100.01116.44
7.4.120.0080.01116.45
7.4.110.0070.01016.41
7.4.100.0150.00316.45
7.4.90.0120.00616.32
7.4.80.0060.01119.37
7.4.70.0150.00416.45
7.4.60.0140.00316.40
7.4.50.0000.00816.13
7.4.40.0150.00316.59
7.4.30.0070.01016.62
7.4.00.0040.01214.65
7.3.330.0000.00613.26
7.3.320.0020.00213.18
7.3.310.0070.00016.27
7.3.300.0060.00016.29
7.3.290.0060.00916.34
7.3.280.0110.00816.28
7.3.270.0070.01117.40
7.3.260.0150.00416.59
7.3.250.0090.01416.53
7.3.240.0070.01116.49
7.3.230.0140.00316.39
7.3.210.0100.00716.48
7.3.200.0030.01319.39
7.3.190.0130.00416.23
7.3.180.0030.01716.56
7.3.170.0120.01216.27
7.3.160.0090.00916.44
7.3.120.0090.00914.81
7.3.110.0070.00414.71
7.3.100.0070.01014.71
7.3.90.0100.00714.96
7.3.80.0000.01714.90
7.3.70.0030.00814.70
7.3.60.0000.01414.82
7.3.50.0040.01114.93
7.3.40.0030.01314.88
7.3.30.0100.00314.71
7.3.20.0100.00316.68
7.3.10.0110.00416.84
7.3.00.0070.00416.76
7.2.330.0120.00616.54
7.2.320.0090.01216.67
7.2.310.0120.00616.47
7.2.300.0080.00816.63
7.2.290.0070.01016.81
7.2.240.0140.00414.82
7.2.230.0090.00615.07
7.2.220.0030.01414.67
7.2.210.0100.00315.00
7.2.200.0000.01515.00
7.2.190.0030.01014.86
7.2.180.0040.01215.15
7.2.170.0030.01014.84
7.2.160.0030.01414.92
7.2.150.0110.00416.93
7.2.140.0110.00016.64
7.2.130.0060.00916.68
7.2.120.0130.00317.05
7.2.110.0000.01116.68
7.2.100.0030.00916.82
7.2.90.0040.01116.94
7.2.80.0040.01216.63
7.2.70.0030.00717.16
7.2.60.0080.00616.82
7.2.50.0040.01117.02
7.2.40.0090.00616.94
7.2.30.0040.01217.05
7.2.20.0070.00717.07
7.2.10.0050.00516.96
7.2.00.0110.00318.22
7.1.330.0100.00615.86
7.1.320.0070.00715.86
7.1.310.0060.00315.71
7.1.300.0040.00715.70
7.1.290.0040.00715.79
7.1.280.0030.01015.92
7.1.270.0070.00715.82
7.1.260.0110.00015.84
7.1.250.0040.00915.71
7.1.200.0090.00015.98
7.1.100.0070.00318.13
7.1.70.0000.00816.82
7.1.60.0030.02119.32
7.1.50.0070.01716.63
7.1.00.0030.07722.30
7.0.200.0030.00616.80
7.0.140.0030.06722.18
7.0.60.0070.06721.66
7.0.50.0030.05717.89
7.0.40.0030.05320.14
7.0.30.0070.08020.30
7.0.20.0070.04320.14
7.0.10.0130.07320.25
7.0.00.0030.08720.29
5.6.210.0130.07720.55
5.6.200.0070.05318.25
5.6.190.0070.08020.32
5.6.180.0030.04320.55
5.6.170.0000.05320.77
5.6.160.0030.08720.33
5.6.150.0100.08020.40
5.6.140.0200.07320.34
5.6.130.0200.05020.40
5.6.120.0100.06320.41
5.6.110.0070.06020.43
5.6.100.0100.05020.48
5.6.90.0070.05720.18
5.6.80.0000.05319.72
5.6.70.0070.05719.54
5.6.60.0030.04319.69
5.6.50.0030.07319.78
5.6.40.0030.06319.67
5.6.30.0030.07319.79
5.6.20.0100.05319.68
5.6.10.0030.05019.73
5.6.00.0030.04319.75
5.5.350.0070.08020.31
5.5.340.0100.03717.94
5.5.330.0070.08720.46
5.5.320.0030.04720.23
5.5.310.0100.06720.32
5.5.300.0030.07720.30
5.5.290.0030.04719.98
5.5.280.0000.10020.20
5.5.270.0070.08320.32
5.5.260.0000.06320.19
5.5.250.0070.08720.01
5.5.240.0070.07719.61
5.5.230.0070.07319.51
5.5.220.0000.05019.67
5.5.210.0130.07319.34
5.5.200.0030.04319.66
5.5.190.0070.08019.33
5.5.180.0100.05319.48
5.5.160.0170.07319.52
5.5.150.0170.05319.58
5.5.140.0100.06719.55
5.5.130.0030.06719.64
5.5.120.0100.07019.47
5.5.110.0000.05319.54
5.5.100.0030.04019.39
5.5.90.0070.03719.45
5.5.80.0030.04319.36
5.5.70.0070.03719.27
5.5.60.0070.03319.42
5.5.50.0000.04319.36
5.5.40.0030.03719.46
5.5.30.0000.04319.28
5.5.20.0000.04019.50
5.5.10.0100.03319.27
5.5.00.0070.03719.45
5.4.450.0000.05019.47
5.4.440.0070.03719.30
5.4.430.0000.08319.39
5.4.420.0170.06319.46
5.4.410.0100.06019.04
5.4.400.0070.05319.08
5.4.390.0000.05018.87
5.4.380.0030.07719.15
5.4.370.0030.04719.14
5.4.360.0130.07019.25
5.4.350.0170.06718.87
5.4.340.0130.06719.15
5.4.320.0130.05319.17
5.4.310.0070.06319.11
5.4.300.0070.08019.00
5.4.290.0100.06018.91
5.4.280.0030.06719.15
5.4.270.0100.07318.85
5.4.260.0000.04019.20
5.4.250.0000.04019.15
5.4.240.0030.03719.11
5.4.230.0000.04019.23
5.4.220.0030.03719.25
5.4.210.0000.04019.19
5.4.200.0030.03719.04
5.4.190.0030.03719.14
5.4.180.0070.03718.85
5.4.170.0070.03318.91
5.4.160.0100.03018.98
5.4.150.0030.03719.13
5.4.140.0070.03316.35
5.4.130.0030.03316.34
5.4.120.0030.04716.33
5.4.110.0070.03316.37
5.4.100.0030.03316.28
5.4.90.0070.03016.66
5.4.80.0030.03716.29
5.4.70.0000.03716.29
5.4.60.0000.03716.45
5.4.50.0030.03316.35
5.4.40.0030.03316.28
5.4.30.0030.03316.25
5.4.20.0030.03316.41
5.4.10.0000.04016.38
5.4.00.0030.03315.82
5.3.290.0070.04014.56
5.3.280.0000.04014.68
5.3.270.0000.04014.62
5.3.260.0070.03314.62
5.3.250.0070.03314.66
5.3.240.0000.04014.64
5.3.230.0100.03014.61
5.3.220.0000.04014.57
5.3.210.0030.03714.61
5.3.200.0070.03314.60
5.3.190.0000.04714.62
5.3.180.0100.03014.58
5.3.170.0100.03014.49
5.3.160.0000.04314.45
5.3.150.0070.03314.71
5.3.140.0030.03714.61
5.3.130.0030.03714.60
5.3.120.0130.02714.56
5.3.110.0070.03314.57
5.3.100.0030.03714.06
5.3.90.0000.04014.04
5.3.80.0030.03314.18
5.3.70.0030.03314.02
5.3.60.0030.03714.08
5.3.50.0070.03013.97
5.3.40.0030.03314.12
5.3.30.0070.03313.92
5.3.20.0100.04313.71
5.3.10.0070.03313.65
5.3.00.0100.04013.57
5.2.170.0030.03311.16
5.2.160.0070.02711.25
5.2.150.0030.06311.13
5.2.140.0030.04311.16
5.2.130.0000.05311.19
5.2.120.0030.05711.26
5.2.110.0100.04011.27
5.2.100.0030.06011.00
5.2.90.0070.03011.18
5.2.80.0070.06311.07
5.2.70.0030.05011.18
5.2.60.0130.05711.02
5.2.50.0100.03711.08
5.2.40.0100.05711.16
5.2.30.0070.03311.03
5.2.20.0070.06011.11
5.2.10.0070.05010.92
5.2.00.0200.04710.64
5.1.60.0070.0379.96
5.1.50.0100.05010.02
5.1.40.0000.05710.03
5.1.30.0030.05710.34
5.1.20.0070.05310.42
5.1.10.0030.0439.98
5.1.00.0100.05310.05
5.0.50.0000.0508.55
5.0.40.0070.0208.45
5.0.30.0000.0608.22
5.0.20.0030.0308.20
5.0.10.0030.0378.22
5.0.00.0030.0438.14
4.4.90.0100.0307.36
4.4.80.0030.0277.36
4.4.70.0030.0237.36
4.4.60.0000.0377.36
4.4.50.0000.0377.36
4.4.40.0000.0377.36
4.4.30.0030.0307.36
4.4.20.0000.0277.36
4.4.10.0070.0277.36
4.4.00.0070.0537.36
4.3.110.0070.0337.36
4.3.100.0000.0237.36
4.3.90.0030.0207.36
4.3.80.0000.0437.36
4.3.70.0030.0237.36
4.3.60.0030.0177.36
4.3.50.0000.0277.36
4.3.40.0000.0377.36
4.3.30.0000.0207.36
4.3.20.0030.0237.36
4.3.10.0000.0207.36
4.3.00.0000.0377.36

preferences:
49.91 ms | 401 KiB | 5 Q