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>'; echo $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.60.0120.00318.68
8.3.50.0100.01019.93
8.3.40.0100.00718.82
8.3.30.0140.00318.83
8.3.20.0000.00820.34
8.3.10.0080.00021.95
8.3.00.0080.00021.01
8.2.180.0070.01118.20
8.2.170.0000.01622.96
8.2.160.0090.00519.05
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0080.00020.39
8.2.120.0080.00026.35
8.2.110.0090.00022.25
8.2.100.0080.00419.32
8.2.90.0060.00319.70
8.2.80.0000.00818.05
8.2.70.0030.00617.93
8.2.60.0030.00718.03
8.2.50.0060.00318.10
8.2.40.0000.00720.42
8.2.30.0040.00419.21
8.2.20.0040.00417.82
8.2.10.0050.00218.15
8.2.00.0050.00318.19
8.1.280.0110.00425.92
8.1.270.0080.00023.89
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0000.01020.41
8.1.230.0070.00422.68
8.1.220.0030.00619.16
8.1.210.0090.00018.79
8.1.200.0000.00817.35
8.1.190.0050.00317.35
8.1.180.0060.00318.10
8.1.170.0030.00618.89
8.1.160.0040.00418.93
8.1.150.0000.00718.83
8.1.140.0070.00019.51
8.1.130.0060.00317.72
8.1.120.0030.00717.52
8.1.110.0040.00717.38
8.1.100.0000.00817.52
8.1.90.0070.00017.50
8.1.80.0000.00717.48
8.1.70.0040.00417.47
8.1.60.0040.00417.62
8.1.50.0000.00717.41
8.1.40.0000.00817.62
8.1.30.0000.01117.53
8.1.20.0040.00417.66
8.1.10.0070.00417.54
8.1.00.0000.00817.54
8.0.300.0060.00321.64
8.0.290.0060.00316.75
8.0.280.0000.00718.50
8.0.270.0070.00017.28
8.0.260.0030.00317.20
8.0.250.0070.00017.02
8.0.240.0000.00717.04
8.0.230.0000.00717.07
8.0.220.0000.00716.82
8.0.210.0040.00416.86
8.0.200.0000.00716.96
8.0.190.0040.00416.91
8.0.180.0040.00416.90
8.0.170.0040.00417.00
8.0.160.0050.00316.98
8.0.150.0040.00416.91
8.0.140.0070.00416.95
8.0.130.0030.00313.49
8.0.120.0000.00816.85
8.0.110.0030.00516.98
8.0.100.0070.00016.86
8.0.90.0050.00316.95
8.0.80.0070.01116.90
8.0.70.0080.00017.09
8.0.60.0070.00016.88
8.0.50.0040.00416.96
8.0.30.0120.01017.06
8.0.20.0090.01017.40
8.0.10.0060.00316.98
8.0.00.0060.01016.65
7.4.330.0050.00015.08
7.4.320.0030.00316.43
7.4.300.0050.00316.64
7.4.290.0040.00416.54
7.4.280.0030.00316.53
7.4.270.0070.00016.63
7.4.260.0030.00316.53
7.4.250.0000.00716.58
7.4.240.0000.00716.63
7.4.230.0030.00316.72
7.4.220.0070.00016.34
7.4.210.0090.00916.64
7.4.200.0030.00316.63
7.4.160.0150.00316.46
7.4.150.0090.00917.40
7.4.140.0140.00817.86
7.4.130.0110.00616.63
7.4.120.0120.00416.47
7.4.110.0130.00316.64
7.4.100.0130.00316.71
7.4.90.0060.01116.54
7.4.80.0070.01019.39
7.4.70.0100.01316.50
7.4.60.0130.00316.59
7.4.50.0030.01316.51
7.4.40.0120.01016.43
7.4.30.0080.00816.51
7.4.00.0080.00814.94
7.3.330.0000.00513.26
7.3.320.0030.00313.24
7.3.310.0000.00716.41
7.3.300.0000.00716.38
7.3.290.0070.00016.38
7.3.280.0100.00816.35
7.3.270.0090.01217.40
7.3.260.0090.00816.31
7.3.250.0090.00716.36
7.3.240.0110.00816.53
7.3.230.0120.00616.52
7.3.210.0040.01416.52
7.3.200.0040.01316.31
7.3.190.0140.00716.58
7.3.180.0130.01016.60
7.3.170.0120.00416.65
7.3.160.0110.00516.28
7.3.120.0050.01214.94
7.3.110.0020.01514.74
7.3.100.0080.00914.98
7.3.90.0000.01214.75
7.3.80.0070.00614.94
7.3.70.0070.00614.84
7.3.60.0060.00614.88
7.3.50.0070.01114.85
7.3.40.0090.00514.77
7.3.30.0070.00714.71
7.3.20.0090.00616.52
7.3.10.0020.01116.60
7.3.00.0060.00816.35
7.2.330.0090.00916.61
7.2.320.0100.01016.61
7.2.310.0080.00916.70
7.2.300.0090.00916.35
7.2.290.0090.00916.76
7.2.250.0070.01215.20
7.2.240.0050.01214.76
7.2.230.0050.01215.21
7.2.220.0080.00315.07
7.2.210.0080.00915.02
7.2.200.0080.00815.18
7.2.190.0030.01114.93
7.2.180.0050.01215.06
7.2.170.0050.01214.99
7.2.160.0100.00715.17
7.2.150.0090.00616.53
7.2.140.0030.00716.97
7.2.130.0000.01416.86
7.2.120.0070.00716.98
7.2.110.0000.01417.00
7.2.100.0040.00716.72
7.2.90.0070.00416.72
7.2.80.0080.00516.91
7.2.70.0030.00716.86
7.2.60.0050.01016.85
7.2.50.0070.00716.74
7.2.40.0030.00916.93
7.2.30.0030.01017.13
7.2.20.0000.01816.79
7.2.10.0000.01316.63
7.2.00.0000.01016.91
7.1.330.0090.00515.89
7.1.320.0030.01115.74
7.1.310.0080.00515.85
7.1.300.0050.00915.71
7.1.290.0090.00515.85
7.1.280.0050.00915.92
7.1.270.0090.00615.68
7.1.260.0060.00715.81
7.1.250.0140.00015.63
7.1.240.0030.01015.83
7.1.230.0000.01015.89
7.1.220.0040.00915.98
7.1.210.0070.00715.74
7.1.200.0030.00815.76
7.1.190.0060.00615.88
7.1.180.0040.00915.78
7.1.170.0090.00015.69
7.1.160.0060.00615.94
7.1.150.0070.01015.81
7.1.140.0030.01015.89
7.1.130.0060.00315.95
7.1.120.0090.00615.94
7.1.110.0090.00315.75
7.1.100.0040.01115.88
7.1.90.0060.00615.68
7.1.80.0000.00815.71
7.1.70.0030.00716.58
7.1.60.0160.00117.77
7.1.50.0040.01115.74
7.1.40.0040.01116.05
7.1.30.0090.00315.75
7.1.20.0060.01015.66
7.1.10.0070.00715.46
7.1.00.0070.03918.95
7.0.330.0130.00315.42
7.0.320.0030.01015.32
7.0.310.0090.00015.25
7.0.300.0040.00715.61
7.0.290.0000.01115.36
7.0.280.0060.00615.37
7.0.270.0060.00615.40
7.0.260.0030.00615.13
7.0.250.0040.00815.32
7.0.240.0000.01315.48
7.0.230.0000.00815.58
7.0.220.0030.00715.51
7.0.210.0100.00615.63
7.0.200.0110.00315.22
7.0.190.0030.00615.45
7.0.180.0030.00715.45
7.0.170.0140.00015.32
7.0.160.0030.00615.31
7.0.150.0070.00715.50
7.0.140.0030.00715.56
7.0.130.0040.01115.55
7.0.120.0030.01215.57
7.0.110.0080.00815.51
7.0.100.0030.00615.39
7.0.90.0080.04617.77
7.0.80.0070.03717.73
7.0.70.0050.04317.84
7.0.60.0030.03317.71
7.0.50.0080.04717.93
7.0.40.0050.02316.82
7.0.30.0090.02216.79
7.0.20.0130.02216.80
7.0.10.0050.03316.70
7.0.00.0100.04216.84
5.6.400.0060.01214.37
5.6.390.0040.00814.55
5.6.380.0120.00314.78
5.6.370.0060.00914.63
5.6.360.0080.00413.99
5.6.350.0030.01014.47
5.6.340.0060.00614.59
5.6.330.0000.01414.33
5.6.320.0030.01014.37
5.6.310.0030.00614.64
5.6.300.0030.01014.16
5.6.290.0060.01014.40
5.6.280.0020.04617.57
5.6.270.0000.01414.72
5.6.260.0070.00714.59
5.6.250.0100.00014.57
5.6.240.0050.04117.64
5.6.230.0080.03817.44
5.6.220.0070.03517.47
5.6.210.0070.04517.56
5.6.200.0050.04517.65
5.6.190.0030.04817.69
5.6.180.0140.02717.71
5.6.170.0130.03117.76
5.6.160.0070.04517.68
5.6.150.0030.04417.71
5.6.140.0120.04017.82
5.6.130.0080.04417.52
5.6.120.0070.04217.67
5.6.110.0070.04817.63
5.6.100.0110.03817.62
5.6.90.0090.04217.68
5.6.80.0100.04017.35
5.6.70.0070.04217.37
5.6.60.0120.03817.30
5.6.50.0030.04517.37
5.6.40.0080.04017.42
5.6.30.0070.04017.41
5.6.20.0050.04317.48
5.6.10.0140.02917.30
5.6.00.0080.04317.31
5.5.380.0050.03217.46
5.5.370.0090.03817.39
5.5.360.0050.04017.47
5.5.350.0080.04017.22
5.5.340.0100.04017.64
5.5.330.0060.02817.54
5.5.320.0080.04317.64
5.5.310.0050.02917.53
5.5.300.0080.04017.57
5.5.290.0080.03917.54
5.5.280.0070.04717.65
5.5.270.0030.03617.54
5.5.260.0050.03117.46
5.5.250.0030.03017.51
5.5.240.0070.04017.07
5.5.230.0060.04317.25
5.5.220.0100.03117.24
5.5.210.0080.04317.14
5.5.200.0070.03217.30
5.5.190.0050.03017.24
5.5.180.0100.04317.10
5.5.170.0100.00314.18
5.5.160.0070.04417.13
5.5.150.0060.04317.32
5.5.140.0070.04417.21
5.5.130.0070.04217.16
5.5.120.0180.03217.11
5.5.110.0050.04317.23
5.5.100.0080.03617.17
5.5.90.0080.02817.18
5.5.80.0050.04417.22
5.5.70.0030.03117.06
5.5.60.0050.04217.20
5.5.50.0080.02617.24
5.5.40.0070.03917.12
5.5.30.0090.04017.14
5.5.20.0050.04117.24
5.5.10.0080.04117.21
5.5.00.0080.03017.03

preferences:
59.92 ms | 401 KiB | 5 Q