3v4l.org

run code in 300+ PHP versions simultaneously
<?php class GlobalArrayWrapper implements ArrayAccess { protected $values = []; public function __construct(array $values) { $this->values = $values; } /** * {@inheritdoc} */ public function offsetExists($offset) { trigger_error('You are doing it wrong', E_USER_DEPRECATED); return isset($this->values[$offset]); } /** * {@inheritdoc} */ public function offsetGet($offset) { trigger_error('You are doing it wrong', E_USER_DEPRECATED); return $this->values[$offset] ?? NULL; } /** * {@inheritdoc} */ public function offsetSet($offset, $value) { trigger_error('You are doing it wrong', E_USER_DEPRECATED); return $this->values[$offset] = $value; } /** * {@inheritdoc} */ public function offsetUnset($offset) { trigger_error('You are doing it wrong', E_USER_DEPRECATED); unset($this->values[$offset]); } } $GLOBALS['pager_page_array'] = [1, 2]; $GLOBALS['pager_page_array'] = new GlobalArrayWrapper($GLOBALS['pager_page_array']); echo $GLOBALS['pager_page_array'][0];

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.4.120.0080.00720.64
8.4.110.0060.00522.47
8.4.100.0120.00918.06
8.4.90.0080.01318.48
8.4.80.0080.00418.08
8.4.70.0070.00918.04
8.4.60.0060.00318.88
8.4.50.0040.00419.58
8.4.40.0030.00619.27
8.4.30.0170.00320.51
8.4.20.0050.00320.57
8.4.10.0030.00618.05
8.3.250.0100.00918.82
8.3.240.0110.00616.76
8.3.230.0120.00716.57
8.3.220.0110.00817.43
8.3.210.0110.00716.82
8.3.200.0040.00516.68
8.3.190.0050.00317.25
8.3.180.0110.01016.62
8.3.170.0040.00418.91
8.3.160.0070.01116.70
8.3.150.0060.01220.90
8.3.140.0090.00916.77
8.3.130.0080.00018.63
8.3.120.0060.00318.98
8.3.110.0030.00616.73
8.3.100.0030.00616.69
8.3.90.0030.00618.71
8.3.80.0060.00318.41
8.3.70.0160.00316.73
8.3.60.0120.00616.63
8.3.50.0070.00719.37
8.3.40.0150.00018.92
8.3.30.0080.00818.92
8.3.20.0080.00021.03
8.3.10.0080.00021.92
8.3.00.0040.00422.59
8.2.290.0100.00620.63
8.2.280.0110.00718.23
8.2.270.0090.00917.16
8.2.260.0030.00520.59
8.2.250.0040.00416.96
8.2.240.0030.01218.46
8.2.230.0060.00320.94
8.2.220.0060.00324.06
8.2.210.0200.00026.77
8.2.200.0090.00018.42
8.2.190.0130.00618.56
8.2.180.0120.00618.31
8.2.170.0070.00722.96
8.2.160.0110.00321.98
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00826.16
8.2.110.0040.00720.56
8.2.100.0080.00418.03
8.2.90.0030.00617.75
8.2.80.0060.00318.03
8.2.70.0000.00818.04
8.2.60.0080.00018.21
8.2.50.0040.00418.10
8.2.40.0000.00821.14
8.2.30.0050.00219.23
8.2.20.0000.00718.11
8.2.10.0070.00019.45
8.2.00.0000.00719.38
8.1.330.0090.00822.07
8.1.320.0120.00716.29
8.1.310.0030.00618.49
8.1.300.0050.00317.97
8.1.290.0030.00618.88
8.1.280.0150.00625.92
8.1.270.0070.00323.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00322.45
8.1.230.0080.00319.22
8.1.220.0060.00317.78
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0030.00517.13
8.1.180.0090.00018.10
8.1.170.0040.00418.69
8.1.160.0040.00418.96
8.1.150.0070.00018.89
8.1.140.0040.00420.28
8.1.130.0000.00720.11
8.1.120.0000.00817.52
8.1.110.0040.00417.52
8.1.100.0060.00317.39
8.1.90.0050.00317.50
8.1.80.0050.00317.48
8.1.70.0050.00317.47
8.1.60.0040.00417.63
8.1.50.0040.00417.41
8.1.40.0040.00417.60
8.1.30.0030.00517.66
8.1.20.0040.00417.67
8.1.10.0000.00717.48
8.1.00.0040.00717.54
8.0.300.0000.00819.79
8.0.290.0040.00416.75
8.0.280.0030.00318.36
8.0.270.0030.00317.39
8.0.260.0000.00720.01
8.0.250.0000.00817.05
8.0.240.0000.00717.05
8.0.230.0000.00717.04
8.0.220.0040.00416.96
8.0.210.0030.00416.91
8.0.200.0080.00017.04
8.0.190.0000.00816.97
8.0.180.0070.00017.05
8.0.170.0060.00317.03
8.0.160.0040.00416.87
8.0.150.0040.00416.79
8.0.140.0070.00016.91
8.0.130.0000.00613.47
8.0.120.0000.00816.98
8.0.110.0000.00716.99
8.0.100.0000.00716.99
8.0.90.0040.00416.78
8.0.80.0110.01016.97
8.0.70.0000.00917.01
8.0.60.0050.00216.91
8.0.50.0020.00516.87
8.0.30.0150.00317.39
8.0.20.0090.00916.96
8.0.10.0040.00416.96
8.0.00.0070.01117.02
7.4.330.0050.00015.55
7.4.320.0040.00416.58
7.4.300.0000.00716.63
7.4.290.0030.00316.60
7.4.280.0040.00416.57
7.4.270.0000.00616.52
7.4.260.0000.00513.31
7.4.250.0000.00916.58
7.4.240.0020.00616.57
7.4.230.0070.00016.61
7.4.220.0030.00516.66
7.4.210.0100.00816.62
7.4.200.0040.00416.37
7.4.130.0090.00916.39
7.4.120.0160.00316.45
7.4.110.0100.00616.54
7.4.100.0090.01416.61
7.4.90.0170.00716.48
7.4.80.0110.00619.39
7.4.70.0100.00616.47
7.4.60.0040.01216.36
7.4.50.0110.00716.55
7.4.40.0090.00816.57
7.4.00.0090.00614.79
7.3.330.0030.00316.26
7.3.320.0000.00513.17
7.3.310.0070.00016.35
7.3.300.0050.00316.24
7.3.290.0100.00616.38
7.3.260.0100.00816.48
7.3.240.0100.00816.41
7.3.230.0110.01016.59
7.3.210.0100.00516.57
7.3.200.0110.00916.48
7.3.190.0030.01416.35
7.3.180.0140.00316.42
7.3.170.0100.00716.40
7.3.160.0070.01016.41
7.3.100.0080.00614.92
7.3.90.0030.01014.82
7.3.80.0030.01014.81
7.3.70.0070.00714.66
7.3.60.0080.00614.72
7.3.50.0100.00714.80
7.3.40.0070.00714.64
7.3.30.0070.00714.50
7.3.20.0100.00614.87
7.3.10.0090.00914.72
7.3.00.0110.00314.81
7.2.330.0080.01216.80
7.2.320.0040.01616.74
7.2.310.0090.00916.69
7.2.300.0140.00916.71
7.2.290.0030.01416.70
7.2.230.0120.00315.00
7.2.220.0100.00315.04
7.2.210.0070.00715.08
7.2.200.0060.00914.98
7.2.190.0080.00815.00
7.2.180.0000.01515.14
7.2.170.0070.00714.93
7.2.160.0030.01314.76
7.2.150.0110.00815.04
7.2.140.0030.01615.12
7.2.130.0200.01315.04
7.2.120.0150.00614.82
7.2.110.0080.00615.07
7.2.100.0090.00615.04
7.2.90.0030.01115.09
7.2.80.0060.00915.01
7.2.70.0090.00914.67
7.2.60.0120.00315.07
7.2.50.0070.00814.77
7.2.40.0140.00014.97
7.2.30.0120.00315.22
7.2.20.0140.00015.03
7.2.10.0090.00615.20
7.2.00.0000.01415.18
7.1.320.0070.00713.99
7.1.310.0030.01014.00
7.1.300.0090.00613.91
7.1.290.0000.01413.64
7.1.280.0130.00313.86
7.1.270.0090.00913.84
7.1.260.0070.00714.07
7.1.250.0140.00314.06

preferences:
30.4 ms | 403 KiB | 5 Q