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);

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.0100.01018.30
8.3.50.0090.00922.12
8.3.40.0150.00018.59
8.3.30.0140.00718.88
8.3.20.0110.00319.93
8.3.10.0030.00523.48
8.3.00.0000.00822.34
8.2.180.0160.00016.46
8.2.170.0100.00622.96
8.2.160.0140.00320.99
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0120.00626.16
8.2.120.0040.00419.36
8.2.110.0000.00922.07
8.2.100.0070.00417.72
8.2.90.0000.00819.17
8.2.80.0000.00817.97
8.2.70.0000.00817.38
8.2.60.0060.00317.80
8.2.50.0050.00318.07
8.2.40.0050.00318.09
8.2.30.0000.00717.96
8.2.20.0030.00617.57
8.2.10.0060.00319.51
8.2.00.0030.00517.67
8.1.280.0160.00325.92
8.1.270.0080.00024.01
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00323.82
8.1.230.0040.00719.01
8.1.220.0000.00817.78
8.1.210.0090.00018.77
8.1.200.0000.01117.23
8.1.190.0030.00517.43
8.1.180.0050.00318.10
8.1.170.0050.00318.46
8.1.160.0000.00721.91
8.1.150.0060.00318.59
8.1.140.0050.00217.34
8.1.130.0050.00317.84
8.1.120.0000.00817.39
8.1.110.0070.00017.45
8.1.100.0070.00017.47
8.1.90.0000.00717.44
8.1.80.0000.00717.51
8.1.70.0000.00717.49
8.1.60.0040.00417.49
8.1.50.0030.00517.52
8.1.40.0070.00017.53
8.1.30.0030.00517.64
8.1.20.0060.00317.69
8.1.10.0050.00217.57
8.1.00.0040.00417.53
8.0.300.0020.00518.77
8.0.290.0060.00317.05
8.0.280.0040.00418.42
8.0.270.0000.00717.23
8.0.260.0000.00916.89
8.0.250.0040.00416.93
8.0.240.0070.00016.84
8.0.230.0000.00716.95
8.0.220.0000.00716.91
8.0.210.0000.00716.87
8.0.200.0030.00317.00
8.0.190.0000.00716.85
8.0.180.0040.00416.88
8.0.170.0040.00416.88
8.0.160.0040.00417.00
8.0.150.0040.00416.84
8.0.140.0050.00216.84
8.0.130.0030.00313.38
8.0.120.0050.00316.88
8.0.110.0000.00716.91
8.0.100.0050.00316.70
8.0.90.0000.00716.72
8.0.80.0100.01016.83
8.0.70.0000.00716.85
8.0.60.0070.00016.86
8.0.50.0000.00716.86
8.0.30.0100.00916.92
8.0.20.0060.01217.40
8.0.10.0040.00416.84
8.0.00.0080.01116.76
7.4.330.0030.00315.15
7.4.320.0000.00716.58
7.4.300.0000.00716.61
7.4.290.0070.00016.53
7.4.280.0040.00416.51
7.4.270.0030.00316.50
7.4.260.0040.00416.63
7.4.250.0040.00416.57
7.4.240.0020.00616.56
7.4.230.0000.00716.67
7.4.220.0160.01016.38
7.4.210.0090.00616.56
7.4.200.0040.00416.41
7.4.190.0040.00416.75
7.4.160.0060.01216.41
7.4.150.0120.00617.40
7.4.140.0070.01117.86
7.4.130.0060.01216.55
7.4.120.0060.01316.63
7.4.110.0130.00316.55
7.4.100.0170.00316.50
7.4.90.0110.00716.46
7.4.80.0140.00316.41
7.4.70.0100.00716.59
7.4.60.0030.01316.55
7.4.50.0050.00016.52
7.4.40.0030.01022.77
7.4.30.0040.01216.73
7.4.10.0070.01114.87
7.4.00.0060.01114.91
7.3.330.0000.00613.26
7.3.320.0000.00513.10
7.3.310.0030.00316.17
7.3.300.0060.00016.29
7.3.290.0090.00916.28
7.3.280.0050.01316.31
7.3.270.0030.01417.40
7.3.260.0070.01516.39
7.3.250.0110.00616.69
7.3.240.0100.00616.36
7.3.230.0090.00716.53
7.3.210.0100.01016.49
7.3.200.0060.01219.39
7.3.190.0380.00816.46
7.3.180.0080.00816.32
7.3.170.0090.00616.30
7.3.160.0040.01116.32
7.3.130.0040.01114.95
7.3.120.0080.01014.75
7.3.110.0120.00315.07
7.3.100.0090.00314.84
7.3.90.0030.01014.45
7.3.80.0000.01314.79
7.3.70.0060.00614.71
7.3.60.0130.00314.81
7.3.50.0000.00914.79
7.3.40.0070.00714.87
7.3.30.0040.00414.46
7.3.20.0070.00716.50
7.3.10.0040.01116.54
7.3.00.0090.00316.43
7.2.330.0040.01416.46
7.2.320.0070.01016.40
7.2.310.0090.01216.73
7.2.300.0120.00916.60
7.2.290.0110.00616.71
7.2.260.0070.01015.02
7.2.250.0080.00815.06
7.2.240.0000.01415.05
7.2.230.0070.01115.24
7.2.220.0070.01015.01
7.2.210.0090.00014.71
7.2.200.0120.00615.11
7.2.190.0030.01114.96
7.2.180.0060.00315.23
7.2.170.0060.00615.01
7.2.160.0120.00614.80
7.2.150.0040.01117.09
7.2.140.0100.00316.89
7.2.130.0070.00916.86
7.2.120.0070.00616.79
7.2.110.0070.00716.78
7.2.100.0080.00716.68
7.2.90.0070.01116.70
7.2.80.0070.00916.82
7.2.70.0080.01016.80
7.2.60.0090.00916.90
7.2.50.0080.00716.85
7.2.40.0080.00816.84
7.2.30.0090.01016.83
7.2.20.0090.00716.86
7.2.10.0040.01416.59
7.2.00.0050.01117.22
7.1.330.0030.01015.54
7.1.320.0000.01215.84
7.1.310.0060.00615.93
7.1.300.0090.00615.54
7.1.290.0070.00415.80
7.1.280.0040.01115.69
7.1.270.0000.01415.72
7.1.260.0030.00615.66
7.1.250.0070.00915.67
7.1.240.0030.01115.66
7.1.230.0070.00715.73
7.1.220.0130.00215.67
7.1.210.0110.00015.53
7.1.200.0030.01015.59
7.1.190.0040.00915.66
7.1.180.0070.00915.76
7.1.170.0050.01015.53
7.1.160.0050.01015.66
7.1.150.0070.00815.74
7.1.140.0040.01315.54
7.1.130.0080.00715.69
7.1.120.0110.00515.64
7.1.110.0090.00715.69
7.1.100.0090.00616.58
7.1.90.0090.00715.54
7.1.80.0080.00815.71
7.1.70.0090.00416.11
7.1.60.0070.01016.81
7.1.50.0130.00822.09
7.1.40.0070.00715.39
7.1.30.0080.00715.64
7.1.20.0070.00615.60
7.1.10.0080.00815.55
7.1.00.0060.02917.90
7.0.330.0050.01015.23
7.0.320.0050.00915.22
7.0.310.0050.00915.36
7.0.300.0030.01015.17
7.0.290.0130.00315.40
7.0.280.0100.00215.18
7.0.270.0100.00715.22
7.0.260.0080.00715.30
7.0.250.0090.00715.44
7.0.240.0080.00515.31
7.0.230.0070.00915.37
7.0.220.0070.00715.28
7.0.210.0060.00515.41
7.0.200.0060.00615.86
7.0.190.0100.00815.38
7.0.180.0090.00515.28
7.0.170.0050.00915.44
7.0.160.0060.00815.26
7.0.150.0050.00915.44
7.0.140.0050.03017.57
7.0.130.0050.01015.40
7.0.120.0040.00915.30
7.0.110.0090.00515.42
7.0.100.0110.02716.81
7.0.90.0070.03216.66
7.0.80.0060.03016.76
7.0.70.0090.02116.80
7.0.60.0070.03116.89
7.0.50.0060.03017.11
7.0.40.0070.01615.61
7.0.30.0040.02515.65
7.0.20.0030.02315.61
7.0.10.0050.01915.53
7.0.00.0060.01815.56
5.6.400.0110.00014.34
5.6.390.0070.00714.45
5.6.380.0090.00514.02
5.6.370.0040.00914.38
5.6.360.0070.00714.36
5.6.350.0050.01114.24
5.6.340.0060.00614.29
5.6.330.0090.00714.17
5.6.320.0090.00214.21
5.6.310.0080.00314.29
5.6.300.0030.01314.28
5.6.290.0100.00114.37
5.6.280.0050.02716.42
5.6.270.0080.00513.94
5.6.260.0030.01314.17
5.6.250.0060.03216.33
5.6.240.0130.02816.45
5.6.230.0060.03116.44
5.6.220.0040.03516.35
5.6.210.0090.02816.29
5.6.200.0030.02116.63
5.6.190.0080.01716.44
5.6.180.0080.02716.38
5.6.170.0030.02116.53
5.6.160.0050.01716.40
5.6.150.0060.01816.51
5.6.140.0070.01716.44
5.6.130.0050.01816.41
5.6.120.0030.01716.45
5.6.110.0030.02116.40
5.6.100.0040.01916.30
5.6.90.0070.01516.40
5.6.80.0090.01316.15
5.6.70.0050.01516.17
5.6.60.0080.01516.21
5.6.50.0060.02216.19
5.6.40.0020.02116.28
5.6.30.0040.01716.22
5.6.20.0060.01616.18
5.6.10.0030.01716.21
5.6.00.0060.01716.13
5.5.380.0090.02815.28
5.5.370.0030.01815.28
5.5.360.0050.02515.38
5.5.350.0050.03115.25
5.5.340.0050.02915.44
5.5.330.0060.02615.42
5.5.320.0070.01715.41
5.5.310.0070.01615.34
5.5.300.0030.02115.31
5.5.290.0070.01315.29
5.5.280.0050.01815.57
5.5.270.0070.01615.40
5.5.260.0020.02415.30
5.5.250.0070.01315.27
5.5.240.0070.01215.14
5.5.230.0050.01415.13
5.5.220.0050.01515.22
5.5.210.0040.02015.20
5.5.200.0030.01815.25
5.5.190.0060.01515.28
5.5.180.0020.02015.28
5.5.170.0020.00712.73
5.5.160.0030.01515.18
5.5.150.0050.01515.21
5.5.140.0020.01815.15
5.5.130.0030.01715.15
5.5.120.0100.01415.25
5.5.110.0090.01515.27
5.5.100.0050.01515.11
5.5.90.0060.01615.17
5.5.80.0050.01915.20
5.5.70.0080.01415.17
5.5.60.0060.01515.11
5.5.50.0030.01815.23
5.5.40.0060.01415.15
5.5.30.0060.02215.08
5.5.20.0080.01115.23
5.5.10.0030.01715.19
5.5.00.0080.02815.21
5.4.450.0040.01814.01
5.4.440.0060.01713.89
5.4.430.0040.01513.96
5.4.420.0070.01113.90
5.4.410.0050.01513.84
5.4.400.0030.01713.73
5.4.390.0040.01413.87
5.4.380.0060.01513.79
5.4.370.0050.01713.80
5.4.360.0040.01813.80
5.4.350.0060.01613.64
5.4.340.0040.01813.74
5.4.330.0090.00411.04
5.4.320.0020.01713.65
5.4.310.0060.01413.66
5.4.300.0070.01613.73
5.4.290.0030.01513.68
5.4.280.0070.01613.72
5.4.270.0060.01713.72
5.4.260.0060.01613.78
5.4.250.0090.01313.67
5.4.240.0060.01413.83
5.4.230.0050.01613.58
5.4.220.0070.01713.56
5.4.210.0090.01613.57
5.4.200.0040.01713.79
5.4.190.0080.01413.77
5.4.180.0070.01513.69
5.4.170.0060.01813.75
5.4.160.0080.01313.77
5.4.150.0070.01413.64
5.4.140.0070.01512.88
5.4.130.0020.01912.83
5.4.120.0050.01512.77
5.4.110.0060.02312.75
5.4.100.0050.02512.90
5.4.90.0070.01912.90
5.4.80.0030.02712.84
5.4.70.0090.02512.88
5.4.60.0040.02812.80
5.4.50.0050.02312.89
5.4.40.0070.01412.94
5.4.30.0060.01312.81
5.4.20.0060.02212.95
5.4.10.0070.01312.84
5.4.00.0060.02012.67
5.3.290.0050.01512.20
5.3.280.0010.01912.13
5.3.270.0060.01412.15
5.3.260.0060.02512.17
5.3.250.0030.01612.09
5.3.240.0030.01912.06
5.3.230.0030.02512.07
5.3.220.0040.01612.04
5.3.210.0060.02711.98
5.3.200.0030.01912.07
5.3.190.0060.02412.00
5.3.180.0030.01612.10
5.3.170.0020.02412.15
5.3.160.0030.02512.17
5.3.150.0030.03212.14
5.3.140.0090.02312.13
5.3.130.0060.02712.12
5.3.120.0020.03112.06
5.3.110.0010.01912.12
5.3.100.0040.01411.83
5.3.90.0050.02911.99
5.3.80.0060.02611.91
5.3.70.0060.01811.97
5.3.60.0050.02111.91
5.3.50.0070.02711.79
5.3.40.0040.02311.95
5.3.30.0040.03011.95
5.3.20.0020.02511.84
5.3.10.0030.02811.71
5.3.00.0040.02211.75
5.2.170.0030.02711.74
5.2.160.0080.01311.74
5.2.150.0070.01511.74
5.2.140.0020.02111.74
5.2.130.0050.03211.74
5.2.120.0030.03311.74
5.2.110.0070.02911.74
5.2.100.0110.01511.74
5.2.90.0060.02511.74
5.2.80.0020.02011.74
5.2.70.0040.03311.74
5.2.60.0060.03011.74
5.2.50.0020.03311.74
5.2.40.0040.01711.74
5.2.30.0050.03811.74
5.2.20.0020.03411.74
5.2.10.0050.02711.74
5.2.00.0050.02811.74
5.1.60.0050.02511.74
5.1.50.0020.02711.74
5.1.40.0030.02511.74
5.1.30.0020.02711.74
5.1.20.0020.02511.74
5.1.10.0040.01711.74
5.1.00.0000.01711.74
5.0.50.0030.01311.74
5.0.40.0010.01311.74
5.0.30.0000.02511.74
5.0.20.0020.01711.74
5.0.10.0040.01311.74
5.0.00.0000.02111.74
4.4.90.0050.01711.74
4.4.80.0030.01511.74
4.4.70.0020.01711.74
4.4.60.0000.01811.74
4.4.50.0040.00811.74
4.4.40.0020.03011.74
4.4.30.0020.02211.74
4.4.20.0030.01511.74
4.4.10.0000.01811.74
4.4.00.0000.01711.74
4.3.110.0030.01711.74
4.3.100.0000.02411.74
4.3.90.0000.01511.74
4.3.80.0000.01711.74
4.3.70.0040.01011.74
4.3.60.0030.00711.74
4.3.50.0000.01411.74
4.3.40.0000.03011.74
4.3.30.0000.01611.74
4.3.20.0030.01811.74
4.3.10.0000.01711.74
4.3.00.0030.01711.74

preferences:
48.05 ms | 401 KiB | 5 Q