3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ListResult extends ArrayObject { protected $response; public function __construct($response) { parent::__construct($response['list']); $this->response = $response; // typically you'd want to keep the original response } } $response = [ 'list' => ['a', 'b'] ]; $result = new ListResult($response); foreach($result as $k => $v){ echo "$k=>$v\n"; } echo "\n\n0=>{$result[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.3.110.0040.00416.79
8.3.100.0050.00516.52
8.3.90.0040.01126.77
8.3.80.0070.00316.50
8.3.70.0140.00016.63
8.3.60.0040.01416.50
8.3.50.0090.00920.33
8.3.40.0100.00320.10
8.3.30.0070.01118.47
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0030.00526.16
8.2.230.0090.00020.94
8.2.220.0050.00324.06
8.2.210.0090.00926.77
8.2.200.0100.00016.50
8.2.190.0150.00616.58
8.2.180.0110.00425.92
8.2.170.0110.00619.09
8.2.160.0100.00322.96
8.2.150.0000.00725.66
8.2.140.0080.00024.66
8.2.130.0030.00726.16
8.2.120.0040.00419.48
8.2.110.0030.00721.02
8.2.100.0030.01017.87
8.2.90.0000.00917.85
8.2.80.0050.00318.16
8.2.70.0000.01117.12
8.2.60.0080.00018.03
8.2.50.0030.00617.77
8.2.40.0050.00319.46
8.2.30.0070.00018.04
8.2.20.0050.00220.32
8.2.10.0030.00617.75
8.2.00.0050.00219.20
8.1.290.0060.00330.84
8.1.280.0120.00925.92
8.1.270.0060.00323.99
8.1.260.0080.00026.35
8.1.250.0090.00028.09
8.1.240.0060.00322.18
8.1.230.0040.00821.03
8.1.220.0000.00817.79
8.1.210.0000.00819.10
8.1.200.0000.00917.36
8.1.190.0040.00417.22
8.1.180.0030.00518.10
8.1.170.0040.00417.62
8.1.160.0040.00418.84
8.1.150.0000.00818.63
8.1.140.0000.00717.38
8.1.130.0030.00320.27
8.1.120.0040.00417.40
8.1.110.0000.00717.49
8.1.100.0040.00317.46
8.1.90.0030.00617.51
8.1.80.0000.00817.38
8.1.70.0000.00717.39
8.1.60.0030.00617.66
8.1.50.0000.00817.53
8.1.40.0000.00817.36
8.1.30.0040.00417.68
8.1.20.0200.00517.57
8.1.10.0130.01117.47
8.1.00.0150.00317.39
8.0.300.0000.00719.63
8.0.290.0050.00316.75
8.0.280.0020.00518.39
8.0.270.0000.00716.90
8.0.260.0000.00618.45
8.0.250.0000.00716.91
8.0.240.0040.00416.86
8.0.230.0030.00516.95
8.0.220.0070.00016.90
8.0.210.0000.00716.80
8.0.200.0000.00616.93
8.0.190.0040.00416.86
8.0.180.0050.00316.94
8.0.170.0050.00316.93
8.0.160.0000.01116.90
8.0.150.0110.00616.76
8.0.140.0110.00516.79
8.0.130.0120.00516.75
8.0.120.0120.00516.87
8.0.110.0110.00516.81
8.0.100.0070.00916.85
8.0.90.0120.00516.79
8.0.80.0140.00416.81
8.0.70.0100.00716.69
8.0.60.0130.00116.74
8.0.50.0050.01016.89
8.0.30.0080.00616.88
8.0.20.0110.00416.84
8.0.10.0080.00816.97
8.0.00.0040.01117.02
7.4.330.0030.00315.55
7.4.320.0060.00016.60
7.4.300.0060.00016.64
7.4.290.0040.00416.55
7.4.280.0000.00816.65
7.4.270.0160.00216.46
7.4.260.0120.00416.51
7.4.250.0150.00316.49
7.4.240.0160.00216.51
7.4.230.0140.00216.38
7.4.220.0100.00616.39
7.4.210.0140.00216.54
7.4.200.0090.01116.52
7.4.190.0130.00316.54
7.4.180.0100.00716.64
7.4.160.0090.00716.57
7.4.150.0070.00716.41
7.4.140.0090.00716.38
7.4.130.0130.00216.44
7.4.120.0120.00116.30
7.4.110.0130.00616.43
7.4.100.0150.00316.47
7.4.90.0180.00116.38
7.4.80.0180.00116.53
7.4.70.0150.00516.41
7.4.60.0180.00216.41
7.4.50.0100.00716.34
7.4.40.0130.00316.31
7.4.30.0130.00316.38
7.4.20.0090.00716.32
7.4.10.0130.00516.41
7.4.00.0100.00716.48
7.3.330.0190.00416.34
7.3.320.0200.00116.15
7.3.310.0190.00416.29
7.3.300.0230.00016.35
7.3.290.0160.00415.47
7.3.280.0190.00315.79
7.3.270.0110.00615.86
7.3.260.0230.00015.84
7.3.250.0160.00515.89
7.3.240.0130.00616.24
7.3.230.0080.00815.87
7.3.220.0120.00615.98
7.3.210.0070.01115.85
7.3.200.0100.00516.07
7.3.190.0130.00416.13
7.3.180.0110.00816.00
7.3.170.0120.00416.10
7.3.160.0150.00316.05
7.3.150.0090.00516.16
7.3.140.0130.00415.90
7.3.130.0140.00315.61
7.3.120.0140.00415.74
7.3.110.0170.00016.00
7.3.100.0130.00315.64
7.3.90.0160.00016.20
7.3.80.0090.00515.87
7.3.70.0140.00515.89
7.3.60.0130.00316.02
7.3.50.0140.00316.04
7.3.40.0130.00316.18
7.3.30.0100.00816.45
7.3.20.0090.00916.27
7.3.10.0210.00016.07
7.3.00.0190.00016.35
7.2.340.0170.00316.29
7.2.330.0090.00915.80
7.2.320.0140.00616.27
7.2.310.0140.00616.39
7.2.300.0070.00916.40
7.2.290.0190.00016.23
7.2.280.0180.00016.13
7.2.270.0090.00916.34
7.2.260.0150.00216.21
7.2.250.0170.00016.23
7.2.240.0160.00016.20
7.2.230.0130.00616.31
7.2.220.0070.00816.11
7.2.210.0160.00416.23
7.2.200.0110.01116.25
7.2.190.0150.00516.02
7.2.180.0130.00916.53
7.2.170.0130.00416.55
7.2.160.0120.00616.53
7.2.150.0130.00516.25
7.2.140.0100.00816.63
7.2.130.0180.00016.86
7.2.120.0130.00416.75
7.2.110.0120.00816.49
7.2.100.0300.00316.54
7.2.90.0150.00416.45
7.2.80.0120.00816.16
7.2.70.0170.00016.50
7.2.60.0120.00416.58
7.2.50.0170.00416.38
7.2.40.0140.00416.59
7.2.30.0090.00616.68
7.2.20.0130.00316.48
7.2.10.0060.00916.61
7.2.00.0070.01016.67
7.1.330.0090.01015.59
7.1.320.0130.00315.42
7.1.310.0160.00315.13
7.1.300.0160.00215.34
7.1.290.0170.00315.32
7.1.280.0090.01315.38
7.1.270.0080.01115.30
7.1.260.0090.00415.41
7.1.250.0090.00515.45
7.1.240.0110.00415.46
7.1.230.0100.00515.39
7.1.220.0140.00215.37
7.1.210.0180.00015.45
7.1.200.0080.00815.48
7.1.190.0200.00015.29
7.1.180.0110.00614.96
7.1.170.0120.00314.96
7.1.160.0130.00415.13
7.1.150.0120.00415.09
7.1.140.0000.01615.25
7.1.130.0080.00814.89
7.1.120.0120.00414.96
7.1.110.0150.00315.22
7.1.100.0110.00415.38
7.1.90.0150.00315.24
7.1.80.0100.00614.89
7.1.70.0090.00914.54
7.1.60.0140.00715.46
7.1.50.0140.00015.16
7.1.40.0070.00715.29
7.1.30.0100.00714.73
7.1.20.0100.00715.16
7.1.10.0100.00715.11
7.1.00.0110.00714.97
7.0.330.0050.01015.11
7.0.320.0200.00014.91
7.0.310.0110.00414.98
7.0.300.0040.00914.70
7.0.290.0070.00715.11
7.0.280.0090.00514.77
7.0.270.0170.00314.83
7.0.260.0050.01014.68
7.0.250.0130.00515.14
7.0.240.0140.00314.92
7.0.230.0300.00314.59
7.0.220.0190.00014.91
7.0.210.0170.00014.78
7.0.200.0090.00614.73
7.0.190.0150.00214.79
7.0.180.0090.00615.09
7.0.170.0100.00514.97
7.0.160.0130.00314.70
7.0.150.0060.01014.64
7.0.140.0120.00414.89
7.0.130.0160.00314.60
7.0.120.0130.01015.29
7.0.110.0090.00514.58
7.0.100.0120.00414.98
7.0.90.0100.00314.93
7.0.80.0100.00314.58
7.0.70.0100.00314.60
7.0.60.0110.00514.55
7.0.50.0150.00014.80
7.0.40.0170.00014.72
7.0.30.0170.00015.15
7.0.20.0140.00414.80
7.0.10.0130.00414.86
7.0.00.0060.01015.01
5.6.400.0110.00515.52
5.6.390.0070.00815.76
5.6.380.0120.00215.71
5.6.370.0100.00315.52
5.6.360.0150.00015.91
5.6.350.0110.00415.73
5.6.340.0140.00215.12
5.6.330.0090.00615.80
5.6.320.0110.00415.74
5.6.310.0130.00415.63
5.6.300.0150.00015.50
5.6.290.0110.00715.46
5.6.280.0120.00315.70
5.6.270.0160.00015.33
5.6.260.0090.00715.62
5.6.250.0100.00615.72
5.6.240.0120.00415.60
5.6.230.0140.00015.53
5.6.220.0000.01515.63
5.6.210.0040.01115.72
5.6.200.0140.00315.51
5.6.190.0090.00515.21
5.6.180.0130.00015.54
5.6.170.0060.00815.76
5.6.160.0070.00715.76
5.6.150.0160.00016.11
5.6.140.0160.00015.76
5.6.130.0110.00415.58
5.6.120.0080.00615.79
5.6.110.0080.00815.79
5.6.100.0120.00715.37
5.6.90.0150.00015.74
5.6.80.0120.00515.47
5.6.70.0140.00016.00
5.6.60.0100.00515.68
5.6.50.0040.00915.29
5.6.40.0130.00315.77
5.6.30.0140.00515.65
5.6.20.0120.00615.37
5.6.10.0120.00214.81
5.6.00.0060.00815.40
5.5.380.0180.00415.92
5.5.370.0150.01015.82
5.5.360.0210.00015.80
5.5.350.0100.00715.73
5.5.340.0140.00315.67
5.5.330.0140.00715.84
5.5.320.0120.00415.93
5.5.310.0140.00515.91
5.5.300.0180.00015.63
5.5.290.0160.00015.68
5.5.280.0100.00715.87
5.5.270.0090.00915.64
5.5.260.0160.00415.86
5.5.250.0100.00716.08
5.5.240.0080.00815.89
5.5.230.0130.00415.96
5.5.220.0080.00815.89
5.5.210.0130.00315.85
5.5.200.0160.00015.71
5.5.190.0160.00315.71
5.5.180.0190.00015.58
5.5.170.0160.00415.70
5.5.160.0190.00015.74
5.5.150.0080.01115.51
5.5.140.0170.00415.56
5.5.130.0140.00715.48
5.5.120.0130.00615.68
5.5.110.0200.00015.71
5.5.100.0210.00015.88
5.5.90.0150.00415.75
5.5.80.0140.00515.71
5.5.70.0210.00015.77
5.5.60.0140.00615.68
5.5.50.0140.00715.96
5.5.40.0150.00315.78
5.5.30.0150.00415.94
5.5.20.0190.00315.91
5.5.10.0190.00015.95
5.5.00.0160.00315.79
5.4.450.0100.00712.94
5.4.440.0080.00812.66
5.4.430.0160.00013.01
5.4.420.0100.00512.84
5.4.410.0160.00012.80
5.4.400.0130.00312.80
5.4.390.0150.00012.59
5.4.380.0130.00312.75
5.4.370.0130.00412.51
5.4.360.0120.00612.89
5.4.350.0140.00312.73
5.4.340.0120.00612.75
5.4.330.0170.00012.50
5.4.320.0170.00012.78
5.4.310.0120.00412.68
5.4.300.0170.00012.95
5.4.290.0120.00612.64
5.4.280.0170.00012.56
5.4.270.0080.00812.88
5.4.260.0110.00412.75
5.4.250.0120.00412.59
5.4.240.0160.00012.72
5.4.230.0120.00412.52
5.4.220.0130.00312.37
5.4.210.0120.00412.40
5.4.200.0100.00712.31
5.4.190.0160.00012.54
5.4.180.0080.00812.63
5.4.170.0110.00512.46
5.4.160.0120.00412.59
5.4.150.0130.00312.49
5.4.140.0150.00012.71
5.4.130.0100.00712.96
5.4.120.0120.00312.76
5.4.110.0130.00312.64
5.4.100.0060.01012.63
5.4.90.0140.00012.58
5.4.80.0150.00012.86
5.4.70.0110.00412.86
5.4.60.0120.00312.85
5.4.50.0150.00012.87
5.4.40.0110.00412.55
5.4.30.0100.00512.91
5.4.20.0150.00012.64
5.4.10.0100.00512.93
5.4.00.0100.00512.59
5.3.290.0090.00912.66
5.3.280.0130.00312.77
5.3.270.0160.00012.67
5.3.260.0150.00012.88
5.3.250.0090.00612.57
5.3.240.0110.00412.78
5.3.230.0120.00412.58
5.3.220.0140.00312.61
5.3.210.0090.00612.84
5.3.200.0110.00412.75
5.3.190.0150.00012.67
5.3.180.0160.00012.80
5.3.170.0130.00312.75
5.3.160.0110.00713.03
5.3.150.0150.00012.70
5.3.140.0120.00412.91
5.3.130.0120.00612.89
5.3.120.0180.00012.87
5.3.110.0080.00812.89
5.3.100.0160.00012.89
5.3.90.0100.00512.93
5.3.80.0110.00412.82
5.3.70.0120.00312.80
5.3.60.0150.00012.62
5.3.50.0080.00812.85
5.3.40.0120.00412.80
5.3.30.0110.00512.82
5.3.20.0100.00312.76
5.3.10.0110.00412.61
5.3.00.0110.00412.38
5.2.170.0050.00811.85
5.2.160.0110.00511.88
5.2.150.0080.00411.73
5.2.140.0060.00611.82
5.2.130.0080.00411.63
5.2.120.0080.00411.63
5.2.110.0080.00311.83
5.2.100.0130.00011.84
5.2.90.0040.00811.59
5.2.80.0120.00011.78
5.2.70.0100.00311.57
5.2.60.0080.00411.62
5.2.50.0130.00011.66
5.2.40.0090.00311.82
5.2.30.0050.00711.74
5.2.20.0060.00611.37
5.2.10.0060.00611.46
5.2.00.0120.00011.54
5.1.60.0060.00610.94
5.1.50.0090.00310.59
5.1.40.0050.00510.77
5.1.30.0080.00410.96
5.1.20.0040.00810.95
5.1.10.0080.00410.97
5.1.00.0110.00010.54
5.0.50.0060.00310.31
5.0.40.0080.00010.31
5.0.30.0090.00010.31
5.0.20.0070.00210.31
5.0.10.0040.00410.31
5.0.00.0060.00310.31
4.4.90.0050.00010.31
4.4.80.0020.00410.31
4.4.70.0040.00210.31
4.4.60.0050.00010.31
4.4.50.0060.00010.31
4.4.40.0040.00210.31
4.4.30.0000.00510.31
4.4.20.0060.00010.31
4.4.10.0050.00010.31
4.4.00.0050.00010.31
4.3.110.0050.00010.31
4.3.100.0030.00210.31
4.3.90.0040.00210.31
4.3.80.0070.00010.31
4.3.70.0060.00010.31
4.3.60.0050.00010.31
4.3.50.0050.00010.31
4.3.40.0030.00310.31
4.3.30.0020.00210.31
4.3.20.0040.00010.31
4.3.10.0040.00010.31
4.3.00.0000.00310.31

preferences:
34.26 ms | 403 KiB | 5 Q