3v4l.org

run code in 300+ PHP versions simultaneously
<?php // essentially tests/classes/array_access_012.phpt, with offsetGet returning by-ref class ArrayAccessImpl implements ArrayAccess { private $data = array(); public function offsetUnset($index) {} public function offsetSet($index, $value) { $this->data[$index] = $value; } public function &offsetGet($index) { return $this->data[$index]; } public function offsetExists($index) { return isset($this->data[$index]); } } $data = new ArrayAccessImpl(); $test = 'some data'; $data['element'] = NULL; // prevent notice $data['element'] = &$test; var_dump($data['element']);

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.01817.00
8.3.50.0130.00719.84
8.3.40.0040.01118.86
8.3.30.0120.00318.83
8.3.20.0040.00419.24
8.3.10.0040.00421.77
8.3.00.0040.00420.77
8.2.180.0070.00716.63
8.2.170.0110.00322.96
8.2.160.0090.00522.12
8.2.150.0080.00024.18
8.2.140.0050.00224.66
8.2.130.0070.00026.16
8.2.120.0050.00319.97
8.2.110.0110.00021.14
8.2.100.0060.00618.03
8.2.90.0050.00318.28
8.2.80.0040.00418.05
8.2.70.0000.00818.05
8.2.60.0030.00618.16
8.2.50.0030.00518.10
8.2.40.0030.00620.57
8.2.30.0030.00519.37
8.2.20.0040.00418.20
8.2.10.0040.00418.13
8.2.00.0000.00717.87
8.1.280.0100.01025.92
8.1.270.0000.00822.20
8.1.260.0020.00526.35
8.1.250.0060.00328.09
8.1.240.0040.00422.81
8.1.230.0070.00422.68
8.1.220.0050.00317.77
8.1.210.0000.00818.77
8.1.200.0070.00317.35
8.1.190.0060.00317.13
8.1.180.0000.00918.10
8.1.170.0040.00418.76
8.1.160.0030.00518.91
8.1.150.0000.00820.27
8.1.140.0040.00419.58
8.1.130.0030.00517.62
8.1.120.0040.00417.46
8.1.110.0070.00017.51
8.1.100.0040.00417.47
8.1.90.0000.00717.32
8.1.80.0040.00417.39
8.1.70.0050.00317.52
8.1.60.0000.00817.48
8.1.50.0000.00817.51
8.1.40.0110.00017.57
8.1.30.0000.00817.51
8.1.20.0040.00417.66
8.1.10.0000.00917.61
8.1.00.0000.00817.56
8.0.300.0110.00019.77
8.0.290.0040.00416.75
8.0.280.0040.00418.46
8.0.270.0050.00216.95
8.0.260.0060.00017.27
8.0.250.0060.00016.92
8.0.240.0000.00816.91
8.0.230.0000.00716.94
8.0.220.0000.00816.88
8.0.210.0070.00016.95
8.0.200.0070.00016.98
8.0.190.0000.00916.91
8.0.180.0040.00416.92
8.0.170.0000.00816.99
8.0.160.0040.00417.04
8.0.150.0070.00416.94
8.0.140.0080.00017.02
8.0.130.0060.00013.32
8.0.120.0060.00316.83
8.0.110.0000.00716.71
8.0.100.0070.00016.90
8.0.90.0080.00016.98
8.0.80.0050.01016.94
8.0.70.0150.00316.88
8.0.60.0060.00916.88
8.0.50.0220.01016.82
8.0.30.0140.00717.14
8.0.20.0150.00617.32
8.0.10.0080.01217.05
8.0.00.0090.01116.83
7.4.330.0060.00015.55
7.4.320.0030.00316.50
7.4.300.0070.00016.60
7.4.290.0030.00316.58
7.4.280.0080.00016.50
7.4.270.0030.00316.61
7.4.260.0080.00016.36
7.4.250.0070.00016.40
7.4.240.0080.00016.53
7.4.230.0000.00716.63
7.4.220.0060.01316.50
7.4.210.0060.01016.58
7.4.200.0000.02216.53
7.4.190.0100.00716.63
7.4.180.0070.01116.71
7.4.160.0080.00916.64
7.4.150.0070.01016.94
7.4.140.0090.00917.52
7.4.130.0110.00616.56
7.4.120.0080.01216.59
7.4.110.0120.01016.54
7.4.100.0140.00816.64
7.4.90.0160.00616.49
7.4.80.0200.00817.98
7.4.70.0060.01016.54
7.4.60.0090.00816.49
7.4.50.0100.00616.50
7.4.40.0080.01116.40
7.4.30.0110.00916.45
7.4.20.0210.00516.64
7.4.10.0090.01015.41
7.4.00.0080.01015.19
7.3.330.0000.00513.38
7.3.320.0000.00513.51
7.3.310.0070.00016.52
7.3.300.0000.00616.39
7.3.290.0100.00916.39
7.3.280.0100.00916.45
7.3.270.0070.01016.91
7.3.260.0090.00816.42
7.3.250.0120.00516.45
7.3.240.0110.00816.45
7.3.230.0120.00716.50
7.3.220.0000.01516.36
7.3.210.0150.00416.38
7.3.200.0120.00616.37
7.3.190.0100.00916.36
7.3.180.0090.00716.43
7.3.170.0100.01016.46
7.3.160.0140.01016.52
7.3.150.0160.01616.28
7.3.140.0160.00816.38
7.3.130.0120.00615.41
7.3.120.0120.00715.27
7.3.110.0060.01015.30
7.3.100.0100.00815.38
7.3.90.0140.00615.36
7.3.80.0090.00715.41
7.3.70.0090.01015.20
7.3.60.0100.00615.46
7.3.50.0080.00915.30
7.3.40.0100.00615.33
7.3.30.0070.01115.48
7.3.20.0130.00416.66
7.3.10.0060.00816.56
7.3.00.0080.00716.59
7.2.340.0210.00516.37
7.2.330.0140.01016.58
7.2.320.0130.01216.40
7.2.310.0240.01116.53
7.2.300.0180.00816.57
7.2.290.0160.00716.47
7.2.280.0170.01116.36
7.2.270.0290.00016.32
7.2.260.0090.01215.38
7.2.250.0140.00415.52
7.2.240.0070.01215.45
7.2.230.0100.01015.45
7.2.220.0110.01015.42
7.2.210.0090.00915.40
7.2.200.0090.01315.50
7.2.190.0100.00815.54
7.2.180.0100.00615.41
7.2.170.0120.00615.49
7.2.160.0090.00915.32
7.2.150.0520.00916.83
7.2.140.0130.00716.77
7.2.130.0090.00916.89
7.2.120.0100.00716.72
7.2.110.0070.00816.80
7.2.100.0090.00716.87
7.2.90.0090.00616.90
7.2.80.0080.00816.69
7.2.70.0120.00616.89
7.2.60.0090.00716.87
7.2.50.0090.00916.84
7.2.40.0150.00416.86
7.2.30.0070.01016.96
7.2.20.0100.00816.88
7.2.10.0070.00916.74
7.2.00.0080.01017.16
7.1.330.0090.00915.81
7.1.320.0120.00715.80
7.1.310.0100.00815.70
7.1.300.0090.00915.72
7.1.290.0060.00915.77
7.1.280.0150.00515.71
7.1.270.0100.00815.70
7.1.260.0130.00615.64
7.1.250.0100.00515.75
7.1.240.0100.00515.73
7.1.230.0180.00615.75
7.1.220.0100.00615.76
7.1.210.0100.00815.72
7.1.200.0100.00815.75
7.1.190.0130.00415.74
7.1.180.0110.00715.71
7.1.170.0080.01315.66
7.1.160.0090.01015.71
7.1.150.0140.00715.63
7.1.140.0060.01115.75
7.1.130.0090.00815.68
7.1.120.0090.01015.62
7.1.110.0090.01115.75
7.1.100.0090.00716.34
7.1.90.0140.00615.78
7.1.80.0110.00415.78
7.1.70.0360.00616.11
7.1.60.0080.00816.14
7.1.50.0090.00616.05
7.1.40.0140.00415.83
7.1.30.0090.00915.75
7.1.20.0070.01015.62
7.1.10.0090.00715.67
7.1.00.0100.02317.39
7.0.330.0070.00815.40
7.0.320.0130.00615.33
7.0.310.0120.00215.35
7.0.300.0090.00815.39
7.0.290.0110.00515.31
7.0.280.0180.00415.38
7.0.270.0060.00815.39
7.0.260.0090.00815.32
7.0.250.0060.01115.51
7.0.240.0070.00915.46
7.0.230.0040.01115.50
7.0.220.0060.01415.36
7.0.210.0290.00815.41
7.0.200.0130.01015.25
7.0.190.0100.00515.24
7.0.180.0100.00715.43
7.0.170.0070.00915.40
7.0.160.0110.00615.38
7.0.150.0070.00715.29
7.0.140.0100.00915.42
7.0.130.0080.02117.03
7.0.120.0100.01917.11
7.0.110.0110.01817.07
7.0.100.0100.01916.97
7.0.90.0100.01817.01
7.0.80.0070.02416.92
7.0.70.0100.01817.08
7.0.60.0090.02117.03
7.0.50.0100.01817.10
7.0.40.0070.02215.98
7.0.30.0080.02016.09
7.0.20.0080.02316.03
7.0.10.0070.02116.07
7.0.00.0070.02116.01
5.6.400.0070.00915.02
5.6.390.0080.00914.97
5.6.380.0080.00715.05
5.6.370.0080.00614.89
5.6.360.0090.00815.02
5.6.350.0070.01215.00
5.6.340.0100.00614.96
5.6.330.0070.00814.92
5.6.320.0100.00814.98
5.6.310.0100.00714.81
5.6.300.0100.00814.96
5.6.290.0110.00614.91
5.6.280.0110.01716.46
5.6.270.0090.02016.38
5.6.260.0110.02416.49
5.6.250.0080.02116.24
5.6.240.0070.02016.49
5.6.230.0090.01916.43
5.6.220.0120.02116.53
5.6.210.0090.02416.39
5.6.200.0150.02016.46
5.6.190.0090.02716.53
5.6.180.0110.01616.37
5.6.170.0070.02616.54
5.6.160.0110.02016.52
5.6.150.0090.02216.51
5.6.140.0130.02116.49
5.6.130.0080.02316.50
5.6.120.0100.02416.54
5.6.110.0110.01916.45
5.6.100.0110.01916.48
5.6.90.0080.02416.36
5.6.80.0090.01916.22
5.6.70.0090.02016.21
5.6.60.0100.02516.23
5.6.50.0060.02116.24
5.6.40.0090.01716.35
5.6.30.0100.01816.25
5.6.20.0090.02016.20
5.6.10.0140.01616.11
5.6.00.0070.02016.34

preferences:
55.91 ms | 401 KiB | 5 Q