3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @author Iltar van der Berg * @version 2.0.0 */ class RecursiveArrayObject extends ArrayObject { /** * overwrites the ArrayObject constructor for * iteration through the "array". When the item * is an array, it creates another self() instead * of an array * * @param Array $array data array */ public function __construct(Array $array) { foreach($array as $key => $value) { if(is_array($value)){ $value = new static($value); } $this->offsetSet($key, $value); } } /** * returns Array when printed (like "echo array();") * instead of an error * * @return string */ public function __ToString() { return 'Array'; } } $array = array('1','2','3,'); $array = new RecursiveArrayObject($array); print_r($array);

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.70.0030.01318.55
8.3.60.0070.00716.61
8.3.50.0070.01016.65
8.3.40.0130.00318.55
8.3.30.0060.01218.43
8.3.20.0150.00018.38
8.3.10.0050.00518.68
8.3.00.0060.00319.13
8.2.180.0040.01118.11
8.2.170.0120.00922.96
8.2.160.0120.00318.82
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0100.00326.16
8.2.120.0040.00420.80
8.2.110.0060.00322.20
8.2.100.0080.00417.56
8.2.90.0000.00819.23
8.2.80.0000.00817.97
8.2.70.0000.00917.50
8.2.60.0040.00417.93
8.2.50.0040.00418.05
8.2.40.0040.00419.89
8.2.30.0060.00317.75
8.2.20.0040.00717.67
8.2.10.0000.00717.71
8.2.00.0050.00517.72
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0100.00023.84
8.1.230.0040.00722.20
8.1.220.0060.00317.76
8.1.210.0070.00318.77
8.1.200.0030.00617.35
8.1.190.0030.00517.00
8.1.180.0040.00418.10
8.1.170.0030.00617.62
8.1.160.0000.00718.93
8.1.150.0040.00418.61
8.1.140.0080.00017.46
8.1.130.0030.00317.75
8.1.120.0000.00717.37
8.1.110.0030.00517.43
8.1.100.0070.00017.42
8.1.90.0040.00417.49
8.1.80.0030.00317.36
8.1.70.0030.00517.48
8.1.60.0000.00717.57
8.1.50.0040.00417.45
8.1.40.0060.00317.52
8.1.30.0050.00317.57
8.1.20.0080.00317.66
8.1.10.0000.00717.45
8.1.00.0030.00617.46
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00718.57
8.0.270.0070.00017.31
8.0.260.0030.00316.84
8.0.250.0080.00316.86
8.0.240.0050.00216.98
8.0.230.0030.00316.93
8.0.220.0070.00016.77
8.0.210.0000.00716.89
8.0.200.0000.00616.84
8.0.190.0080.00016.83
8.0.180.0000.00716.75
8.0.170.0000.00916.81
8.0.160.0030.00316.85
8.0.150.0000.00816.81
8.0.140.0080.00016.84
8.0.130.0000.00613.36
8.0.120.0040.00416.87
8.0.110.0040.00416.93
8.0.100.0000.00716.76
8.0.90.0040.00416.80
8.0.80.0060.00916.85
8.0.70.0000.00716.85
8.0.60.0000.00816.75
8.0.50.0070.00016.71
8.0.30.0030.01116.97
8.0.20.0120.01017.00
8.0.10.0000.00817.13
8.0.00.0210.01816.67
7.4.330.0000.00512.99
7.4.320.0040.00416.61
7.4.300.0070.00016.62
7.4.290.0030.00516.62
7.4.280.0080.00016.66
7.4.270.0000.00616.44
7.4.260.0000.00613.31
7.4.250.0040.00416.50
7.4.240.0040.00416.63
7.4.230.0040.00416.45
7.4.220.0060.01216.58
7.4.210.0110.00616.70
7.4.200.0030.00316.36
7.4.190.0000.00716.42
7.4.160.0110.00416.28
7.4.150.0110.00816.60
7.4.140.0170.00016.39
7.4.130.0100.00716.47
7.4.120.0070.01016.62
7.4.110.0110.00716.81
7.4.100.0030.01416.50
7.4.90.0110.00816.71
7.4.80.0100.00719.39
7.4.70.0120.00416.59
7.4.60.0130.00316.55
7.4.50.0060.00016.54
7.4.40.0090.00316.32
7.4.30.0090.00916.54
7.4.00.0040.01114.98
7.3.330.0060.00013.17
7.3.320.0060.00013.09
7.3.310.0030.00316.20
7.3.300.0030.00316.30
7.3.290.0070.00716.28
7.3.280.0110.00516.29
7.3.270.0170.00716.29
7.3.260.0150.00316.51
7.3.250.0150.00716.64
7.3.240.0090.00916.32
7.3.230.0100.00716.51
7.3.210.0130.00316.54
7.3.200.0140.00716.25
7.3.190.0070.01016.54
7.3.180.0140.00516.58
7.3.170.0150.00316.37
7.3.160.0110.01116.30
7.3.120.0150.00014.54
7.3.10.0100.00016.73
7.3.00.0030.01016.67
7.2.330.0100.00716.75
7.2.320.0070.01016.69
7.2.310.0100.01016.83
7.2.300.0100.00716.53
7.2.290.0060.01216.77
7.2.130.0090.00016.86
7.2.120.0070.00716.73
7.2.110.0040.00716.90
7.2.100.0030.00917.01
7.2.90.0030.01117.00
7.2.80.0030.01016.84
7.2.70.0030.00916.74
7.2.60.0030.00617.03
7.2.50.0000.01017.07
7.2.40.0030.01016.91
7.2.30.0000.01116.95
7.2.20.0030.00917.03
7.2.10.0070.00716.71
7.2.00.0110.00518.35
7.1.250.0040.00815.80
7.1.100.0040.01118.02
7.1.70.0040.00417.18
7.1.60.0040.00819.30
7.1.50.0060.00916.60
7.1.00.0130.06322.53
7.0.200.0070.00316.91
7.0.140.0130.06322.21
7.0.120.0130.05322.19
7.0.60.0030.08719.91
7.0.50.0000.04317.95
7.0.40.0070.04720.04
7.0.30.0270.08020.20
7.0.20.0330.04720.30
7.0.10.0100.04320.23
7.0.00.0000.09020.22
5.6.280.0130.06720.91
5.6.210.0070.04020.62
5.6.200.0030.04018.24
5.6.190.0100.08020.69
5.6.180.0270.07320.67
5.6.170.0430.07020.56
5.6.160.0070.08320.44
5.6.150.0100.08018.11
5.6.140.0030.04018.28
5.6.130.0030.08318.17
5.6.120.0000.08721.05
5.6.110.0070.08321.02
5.6.100.0170.07721.03
5.6.90.0100.07320.98
5.6.80.0200.06720.55
5.5.350.0070.04020.39
5.5.340.0070.07717.98
5.5.330.0070.05020.15
5.5.320.0030.07320.35
5.5.310.0270.08020.26
5.5.300.0100.07717.93
5.5.290.0070.07718.04
5.5.280.0100.03720.89
5.5.270.0100.08020.86
5.5.260.0200.07020.88
5.5.250.0070.03720.62
5.5.240.0130.07320.24
5.4.450.0100.07719.57
5.4.440.0000.05019.18
5.4.430.0100.07019.46
5.4.420.0200.07019.42
5.4.410.0100.06319.18
5.4.400.0030.08018.96
5.4.390.0170.07019.00
5.4.380.0100.05019.27
5.4.370.0100.07318.88
5.4.360.0100.04019.12
5.4.350.0030.05719.12
5.4.340.0100.04719.15
5.4.320.0030.08019.18
5.4.310.0100.04719.08
5.4.300.0200.05319.16
5.4.290.0100.07018.87
5.4.280.0170.06018.97
5.4.270.0130.06719.15
5.4.260.0100.06019.11
5.4.250.0070.07719.13
5.4.240.0030.03719.20
5.4.230.0130.03719.15
5.4.220.0070.07019.20
5.4.210.0100.07019.14
5.4.200.0100.04319.08
5.4.190.0030.05019.13
5.4.180.0100.06019.14
5.4.170.0070.07319.14
5.4.160.0100.04719.13
5.4.150.0030.05319.12
5.4.140.0030.07716.30
5.4.130.0030.03716.59
5.4.120.0070.04016.45
5.4.110.0070.07316.30
5.4.100.0170.05016.40
5.4.90.0000.07716.39
5.4.80.0100.06716.28
5.4.70.0100.04016.41
5.4.60.0130.06316.40
5.4.50.0100.07016.45
5.4.40.0100.07316.42
5.4.30.0030.06316.64
5.4.20.0130.05016.27
5.4.10.0000.06716.30
5.4.00.0000.06715.87
5.3.290.0130.06714.70
5.3.280.0100.07314.68
5.3.270.0130.06314.61
5.3.260.0000.05014.63
5.3.250.0100.07714.65
5.3.240.0070.04714.50
5.3.230.0000.08314.63
5.3.220.0030.05014.65
5.3.210.0100.07314.59
5.3.200.0100.07314.57
5.3.190.0030.07714.63
5.3.180.0100.07314.73
5.3.170.0030.07014.63
5.3.160.0100.07014.64
5.3.150.0070.07714.58
5.3.140.0100.07014.45
5.3.130.0070.08314.56
5.3.120.0100.07714.60
5.3.110.0200.07314.70
5.3.100.0070.05014.05
5.3.90.0100.07014.19
5.3.80.0000.04314.05
5.3.70.0070.04714.08
5.3.60.0030.07014.02
5.3.50.0030.04013.98
5.3.40.0030.06714.01
5.3.30.0070.07013.93
5.3.20.0070.07013.68
5.3.10.0070.07713.74
5.3.00.0100.07013.70
5.2.170.0000.03311.21
5.2.160.0030.06011.31
5.2.150.0000.03311.11
5.2.140.0070.06011.14
5.2.130.0070.04311.00
5.2.120.0000.05011.15
5.2.110.0030.05311.25
5.2.100.0070.06311.11
5.2.90.0070.04011.07
5.2.80.0030.04011.15
5.2.70.0030.03711.25
5.2.60.0100.05711.05
5.2.50.0000.04711.07
5.2.40.0000.06711.05
5.2.30.0070.05711.02
5.2.20.0030.05711.11
5.2.10.0030.06310.91
5.2.00.0030.06310.76
5.1.60.0030.0579.91
5.1.50.0000.0309.97
5.1.40.0000.03010.13
5.1.30.0000.02710.33
5.1.20.0000.02710.25
5.1.10.0030.02710.12
5.1.00.0000.0279.98
5.0.50.0000.0238.56
5.0.40.0000.0208.48
5.0.30.0000.0338.38
5.0.20.0030.0208.23
5.0.10.0000.0208.34
5.0.00.0000.0338.23
4.4.90.0070.0308.23
4.4.80.0070.0238.23
4.4.70.0000.0238.23
4.4.60.0070.0238.23
4.4.50.0030.0238.23
4.4.40.0130.0478.23
4.4.30.0030.0378.23
4.4.20.0000.0178.23
4.4.10.0000.0178.23
4.4.00.0000.0238.23
4.3.110.0030.0138.23
4.3.100.0000.0208.23
4.3.90.0000.0138.23
4.3.80.0000.0238.23
4.3.70.0000.0178.23
4.3.60.0000.0138.23
4.3.50.0000.0178.23
4.3.40.0000.0238.23
4.3.30.0000.0138.23
4.3.20.0000.0138.23
4.3.10.0000.0138.23
4.3.00.0000.0138.23

preferences:
70.14 ms | 401 KiB | 5 Q