3v4l.org

run code in 300+ PHP versions simultaneously
<?php $keys = array(); $header = array(); //get all keyes from first object foreach($q2 as $key){ $header[] = $key->row_name; } $q2a = json_decode(json_encode($q2), true); foreach($q2a as $q){ foreach($q as $k => $v){ $tmp_array[$k][] = $v; } } $output='<table><tr><th></th>'; foreach($header as $key){ $output .= '<th>' . $key . '</th>'; } $output .= '</tr>'; $tmp_array = array_slice($tmp_array, 1, -1); foreach($tmp_array as $key => $val){ $arl = count($val); $output .= '<tr>'; //display keys for($i = 0; $i < $arl ; $i++ ){ $output .= '<td>'. $key[$i] .'</td>'; //display values for($i = 0; $i < $arl; $i++ ){ $output .= '<td>'. $val[$i] .'</td>'; } $output .= '</tr>'; } } $output .= '</table>'; return $output;

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.0070.01016.75
8.3.60.0070.00718.55
8.3.50.0160.00622.88
8.3.40.0080.00818.82
8.3.30.0120.00318.82
8.3.20.0080.00020.29
8.3.10.0030.00623.50
8.3.00.0030.00620.96
8.2.190.0110.01116.88
8.2.180.0070.01318.54
8.2.170.0120.00622.96
8.2.160.0170.00319.29
8.2.150.0050.00324.18
8.2.140.0000.01424.66
8.2.130.0040.00420.51
8.2.120.0050.00226.35
8.2.110.0090.00019.27
8.2.100.0040.00718.03
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0030.00717.49
8.2.60.0030.00617.80
8.2.50.0050.00318.10
8.2.40.0080.00020.44
8.2.30.0070.00019.44
8.2.20.0030.00617.83
8.2.10.0000.00718.20
8.2.00.0000.00718.25
8.1.280.0090.00925.92
8.1.270.0040.00423.79
8.1.260.0080.00028.09
8.1.250.0070.00028.09
8.1.240.0030.00621.44
8.1.230.0040.00817.83
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0050.00318.22
8.1.160.0030.00318.91
8.1.150.0000.00718.88
8.1.140.0040.00419.60
8.1.130.0080.00017.76
8.1.120.0050.00517.52
8.1.110.0030.00817.48
8.1.100.0000.00717.39
8.1.90.0000.00717.50
8.1.80.0000.00717.52
8.1.70.0000.00717.38
8.1.60.0040.00417.62
8.1.50.0040.00417.51
8.1.40.0030.00517.50
8.1.30.0040.00717.65
8.1.20.0050.00217.66
8.1.10.0030.00617.55
8.1.00.0000.00817.57
8.0.300.0040.00418.77
8.0.290.0020.00516.75
8.0.280.0000.00718.53
8.0.270.0080.00017.32
8.0.260.0000.00617.20
8.0.250.0030.00316.93
8.0.240.0030.00317.00
8.0.230.0080.00017.02
8.0.220.0020.00516.98
8.0.210.0000.00716.98
8.0.200.0030.00317.00
8.0.190.0000.00717.03
8.0.180.0040.00416.86
8.0.170.0050.00316.90
8.0.160.0030.00317.00
8.0.150.0000.00816.81
8.0.140.0040.00416.98
8.0.130.0060.00313.38
8.0.120.0000.00816.93
8.0.110.0000.00816.91
8.0.100.0000.00716.88
8.0.90.0050.00317.00
8.0.80.0070.01016.95
8.0.70.0000.00716.78
8.0.60.0050.00216.88
8.0.50.0040.00417.00
8.0.30.0090.01117.04
8.0.20.0100.00917.40
8.0.10.0040.00417.13
8.0.00.0080.00916.80
7.4.330.0020.00215.08
7.4.320.0060.00016.52
7.4.300.0000.00616.48
7.4.290.0040.00416.65
7.4.280.0040.00416.66
7.4.270.0000.00716.58
7.4.260.0040.00416.48
7.4.250.0040.00416.61
7.4.240.0040.00416.62
7.4.230.0050.00216.51
7.4.220.0180.00716.72
7.4.210.0050.01216.63
7.4.200.0040.00416.53
7.4.160.0160.00016.48
7.4.150.0120.00617.40
7.4.140.0100.01017.86
7.4.130.0120.00716.67
7.4.120.0110.00816.59
7.4.110.0080.00816.44
7.4.100.0100.00716.43
7.4.90.0030.01316.61
7.4.80.0140.00319.39
7.4.70.0060.01016.62
7.4.60.0080.00816.51
7.4.50.0000.01416.57
7.4.40.0000.01816.57
7.4.30.0070.00916.62
7.4.00.0090.00715.26
7.3.330.0000.00513.14
7.3.320.0050.00013.19
7.3.310.0040.00316.18
7.3.300.0000.00616.33
7.3.290.0070.00016.31
7.3.280.0090.01116.34
7.3.270.0070.01017.40
7.3.260.0090.00816.43
7.3.250.0130.00416.36
7.3.240.0070.01216.60
7.3.230.0170.00016.39
7.3.210.0060.01216.59
7.3.200.0090.00916.32
7.3.190.0150.00916.44
7.3.180.0120.00616.36
7.3.170.0040.01316.37
7.3.160.0130.01016.37
7.3.120.0080.00814.82
7.3.110.0060.01014.89
7.3.100.0090.00615.06
7.3.90.0050.00514.90
7.3.80.0070.00714.79
7.3.70.0060.00314.91
7.3.60.0040.01114.68
7.3.50.0090.00614.77
7.3.40.0000.01114.85
7.3.30.0060.01014.79
7.3.20.0070.01016.46
7.3.10.0100.00616.66
7.3.00.0040.01116.52
7.2.330.0110.00916.66
7.2.320.0120.00916.74
7.2.310.0040.01216.64
7.2.300.0030.01316.78
7.2.290.0090.00916.49
7.2.250.0120.00615.00
7.2.240.0030.01715.04
7.2.230.0060.00915.17
7.2.220.0090.00615.16
7.2.210.0030.01414.93
7.2.200.0000.01214.76
7.2.190.0060.01015.10
7.2.180.0030.00915.13
7.2.170.0090.00314.90
7.2.130.0070.00816.73
7.2.120.0070.00616.81
7.2.110.0070.00716.65
7.2.100.0070.00916.63
7.2.90.0090.00716.81
7.2.80.0130.00716.74
7.2.70.0100.00816.76
7.2.60.0120.00816.80
7.2.50.0070.00816.73
7.2.40.0080.00716.77
7.2.30.0100.00516.84
7.2.20.0070.00716.59
7.2.10.0100.00516.73
7.2.00.0060.00816.89
7.1.330.0130.00015.79
7.1.320.0050.00515.74
7.1.310.0070.00716.00
7.1.300.0000.01215.83
7.1.290.0060.00915.93
7.1.280.0110.00415.58
7.1.270.0070.00315.77
7.1.260.0120.00415.83
7.1.250.0060.00815.77
7.1.240.0040.00615.81
7.1.230.0040.00815.73
7.1.220.0060.00515.66
7.1.210.0090.00415.53
7.1.200.0040.00915.67
7.1.190.0050.00815.72
7.1.180.0080.00715.81
7.1.170.0120.00315.69
7.1.160.0060.00515.59
7.1.150.0060.00615.71
7.1.140.0050.00615.76
7.1.130.0080.00515.54
7.1.120.0070.00715.75
7.1.110.0050.00915.49
7.1.100.0060.00615.56
7.1.90.0050.00815.82
7.1.80.0040.00615.52
7.1.70.0070.00716.21
7.1.60.0150.00517.06
7.1.50.0080.00615.59
7.1.40.0040.01015.70
7.1.30.0070.00715.64
7.1.20.0060.00615.64
7.1.10.0060.00415.66
7.1.00.0080.02917.93
7.0.330.0070.00515.21
7.0.320.0050.00915.18
7.0.310.0060.00615.18
7.0.300.0060.00915.14
7.0.290.0060.00515.26
7.0.280.0060.00915.36
7.0.270.0050.00615.37
7.0.260.0050.00715.21
7.0.250.0080.00815.23
7.0.240.0050.00715.42
7.0.230.0060.00615.45
7.0.220.0080.00515.35
7.0.210.0070.00615.24
7.0.200.0070.00615.20
7.0.190.0050.00615.19
7.0.180.0050.01115.22
7.0.170.0100.00315.33
7.0.160.0040.00615.37
7.0.150.0090.00515.07
7.0.140.0010.00915.13
7.0.130.0070.00715.31
7.0.120.0090.00515.25
7.0.110.0080.00815.36
7.0.100.0100.00415.37
7.0.90.0270.03316.91
7.0.80.0260.02016.90
7.0.70.0250.03216.77
7.0.60.0230.03316.93
7.0.50.0210.02417.04
7.0.40.0070.02915.59
7.0.30.0040.02215.47
7.0.20.0080.02515.67
7.0.10.0100.03015.64
7.0.00.0050.03015.58
5.6.380.0080.00513.92
5.6.370.0030.01114.07
5.6.360.0030.01114.17
5.6.350.0060.00614.29
5.6.340.0050.00614.39
5.6.330.0060.00514.00
5.6.320.0030.00714.22
5.6.310.0060.00714.18
5.6.300.0080.00514.29
5.6.290.0070.00414.38
5.6.280.0020.02816.50
5.6.270.0040.00814.33
5.6.260.0090.00514.24
5.6.250.0040.00914.12
5.6.240.0080.02816.48
5.6.230.0060.03616.34
5.6.220.0060.03016.27
5.6.210.0020.02316.33
5.6.200.0070.01916.53
5.6.190.0010.02116.43
5.6.180.0080.02416.50
5.6.170.0080.01516.46
5.6.160.0010.03316.48
5.6.150.0070.02016.50
5.6.140.0080.02916.48
5.6.130.0060.03016.38
5.6.120.0020.03316.45
5.6.110.0050.01816.49
5.6.100.0070.02116.45
5.6.90.0030.02016.39
5.6.80.0040.01716.23
5.6.70.0020.02616.14
5.6.60.0040.02916.27
5.6.50.0080.01816.13
5.6.40.0090.02116.24
5.6.30.0070.03116.31
5.6.20.0060.01816.10
5.6.10.0100.01616.16
5.6.00.0050.02116.37
5.5.380.0070.03114.02
5.5.370.0060.03214.14
5.5.360.0090.02914.15
5.5.350.0070.02914.08
5.5.340.0030.02614.24
5.5.330.0030.03114.17
5.5.320.0100.02614.16
5.5.310.0030.03214.31
5.5.300.0060.02914.22
5.5.290.0070.02214.28
5.5.280.0050.01714.20
5.5.270.0050.02514.24
5.5.260.0040.01714.29
5.5.250.0030.02514.15
5.5.240.0060.01914.04
5.5.230.0050.01513.93
5.5.220.0070.01513.97
5.5.210.0030.01814.08
5.5.200.0040.02914.03
5.5.190.0020.03414.06
5.5.180.0030.02713.90
5.5.170.0060.00410.96
5.5.160.0070.01614.08
5.5.150.0070.01614.08
5.5.140.0060.03113.97
5.5.130.0050.02014.04
5.5.120.0010.02213.98
5.5.110.0060.03014.07
5.5.100.0070.02813.97
5.5.90.0080.02514.04
5.5.80.0080.02013.78
5.5.70.0070.01613.94
5.5.60.0030.02614.00
5.5.50.0040.02013.96
5.5.40.0010.03113.99
5.5.30.0060.02814.01
5.5.20.0050.02713.90
5.5.10.0020.03413.94
5.5.00.0050.01713.89

preferences:
56.7 ms | 401 KiB | 5 Q