3v4l.org

run code in 300+ PHP versions simultaneously
<?php //global $blog_id; $blog_id = 10; //might use $site_id instead $params = array( 'publication_or_data' => 'Publication', 'category' => 'Published/Forthcoming', ); $query = "select * from wp_{$blog_id}_posts where id in ("; foreach($params as $param => $values) { if(substr($query, -13) != 'where id in (') { $query .= " and id in ("; } $query .= "select post_id from wp_{$blog_id}_postmeta where meta_key = {$param} and meta_value "; if(is_array($values)) { $query .= "in ('"; $query .= implode("','",$values); $query .= "')"; } else { $query .= "= '{$values}'"; } $query .= ")"; } echo $query;

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.00616.75
8.3.50.0180.00021.15
8.3.40.0110.00318.70
8.3.30.0090.00519.04
8.3.20.0050.00220.11
8.3.10.0040.00423.48
8.3.00.0040.00419.26
8.2.180.0000.01516.38
8.2.170.0100.00322.96
8.2.160.0070.00720.22
8.2.150.0040.00424.18
8.2.140.0160.00324.66
8.2.130.0040.00426.16
8.2.120.0030.00521.00
8.2.110.0080.00320.99
8.2.100.0090.00317.75
8.2.90.0000.00819.25
8.2.80.0060.00317.97
8.2.70.0080.00017.50
8.2.60.0060.00317.93
8.2.50.0000.00818.07
8.2.40.0030.00520.07
8.2.30.0080.00018.16
8.2.20.0000.00717.65
8.2.10.0040.00418.16
8.2.00.0000.00718.02
8.1.280.0120.00625.92
8.1.270.0080.00520.38
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0070.00321.00
8.1.230.0080.00417.42
8.1.220.0000.00817.78
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0060.00317.23
8.1.180.0090.00018.10
8.1.170.0030.00618.61
8.1.160.0040.00422.04
8.1.150.0070.00018.77
8.1.140.0050.00217.48
8.1.130.0000.00717.76
8.1.120.0060.00317.53
8.1.110.0000.00817.38
8.1.100.0050.00217.50
8.1.90.0000.00817.46
8.1.80.0000.00817.36
8.1.70.0060.00017.51
8.1.60.0090.00317.46
8.1.50.0050.00317.50
8.1.40.0030.00517.43
8.1.30.0000.00817.69
8.1.20.0070.00317.71
8.1.10.0040.00417.38
8.1.00.0040.00417.45
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0030.00318.48
8.0.270.0030.00317.19
8.0.260.0030.00317.23
8.0.250.0040.00416.92
8.0.240.0050.00217.02
8.0.230.0030.00316.88
8.0.220.0000.00716.90
8.0.210.0030.00316.96
8.0.200.0000.00617.05
8.0.190.0000.00817.02
8.0.180.0040.00417.00
8.0.170.0030.00916.85
8.0.160.0000.00816.96
8.0.150.0040.00416.76
8.0.140.0040.00416.93
8.0.130.0000.00513.34
8.0.120.0000.00816.95
8.0.110.0000.00816.76
8.0.100.0050.00216.77
8.0.90.0040.00416.81
8.0.80.0060.00916.89
8.0.70.0030.00516.97
8.0.60.0000.00816.94
8.0.50.0030.00516.77
8.0.30.0090.00917.02
8.0.20.0080.01117.40
8.0.10.0030.00616.98
8.0.00.0090.00916.87
7.4.330.0030.00315.13
7.4.320.0060.00016.63
7.4.300.0030.00316.44
7.4.290.0000.00716.51
7.4.280.0000.00816.54
7.4.270.0000.00716.54
7.4.260.0070.00016.41
7.4.250.0000.00816.52
7.4.240.0020.00616.52
7.4.230.0000.00716.46
7.4.220.0090.01216.71
7.4.210.0050.01016.45
7.4.200.0000.00716.65
7.4.160.0070.01416.47
7.4.150.0090.00917.40
7.4.140.0080.01117.86
7.4.130.0120.00916.50
7.4.120.0100.00716.62
7.4.110.0090.01216.60
7.4.100.0190.00916.45
7.4.90.0070.01116.50
7.4.80.0110.00619.39
7.4.70.0080.01216.39
7.4.60.0100.00616.51
7.4.50.0040.00016.52
7.4.40.0130.01016.52
7.4.30.0120.00616.48
7.4.00.0070.00914.69
7.3.330.0000.00613.20
7.3.320.0030.00313.25
7.3.310.0040.00416.30
7.3.300.0000.00616.29
7.3.290.0100.00416.41
7.3.280.0080.01016.34
7.3.270.0070.01017.40
7.3.260.0100.00916.29
7.3.250.0080.00916.44
7.3.240.0100.00716.66
7.3.230.0060.01016.42
7.3.210.0090.00616.62
7.3.200.0170.01119.39
7.3.190.0100.00616.45
7.3.180.0090.01216.20
7.3.170.0130.00316.42
7.3.160.0090.01216.38
7.3.120.0070.00814.68
7.3.110.0080.00814.85
7.3.100.0060.00815.13
7.3.90.0040.00814.69
7.3.80.0050.01214.79
7.3.70.0060.00914.88
7.3.60.0030.01214.74
7.3.50.0080.00814.71
7.3.40.0060.00714.84
7.3.30.0060.00814.59
7.3.20.0060.00716.68
7.3.10.0030.01116.61
7.3.00.0060.01016.58
7.2.330.0120.00616.74
7.2.320.0180.00016.73
7.2.310.0140.00316.42
7.2.300.0140.00316.57
7.2.290.0070.01316.72
7.2.250.0030.01415.27
7.2.240.0110.00414.90
7.2.230.0080.00915.30
7.2.220.0070.00715.12
7.2.210.0110.00614.92
7.2.200.0090.00714.95
7.2.190.0050.01215.00
7.2.180.0070.00714.93
7.2.170.0050.01114.86
7.2.160.0040.01114.91
7.2.150.0000.01616.89
7.2.140.0000.01916.99
7.2.130.0100.00716.84
7.2.120.0100.00616.68
7.2.110.0060.00716.79
7.2.100.0050.01017.07
7.2.90.0070.01016.95
7.2.80.0030.00816.75
7.2.70.0100.00416.83
7.2.60.0170.00716.69
7.2.50.0070.00316.79
7.2.40.0070.00716.83
7.2.30.0080.00616.95
7.2.20.0030.01116.94
7.2.10.0100.00516.97
7.2.00.0050.00717.76
7.1.330.0030.01315.84
7.1.320.0060.00515.72
7.1.310.0070.00715.74
7.1.300.0060.00915.67
7.1.290.0090.00515.56
7.1.280.0050.00815.79
7.1.270.0020.01315.81
7.1.260.0050.00715.71
7.1.250.0050.00815.81
7.1.200.0000.01415.79
7.1.100.0080.00318.26
7.1.70.0020.00517.19
7.1.60.0100.01419.48
7.1.50.1650.00916.54
7.1.00.0000.07722.45
7.0.200.0050.00516.76
7.0.60.0030.04720.03
7.0.50.0100.07717.92
7.0.40.0030.09020.24
7.0.30.0330.08020.04
7.0.20.0200.07720.01
7.0.10.0270.08320.19
7.0.00.0100.07720.04
5.6.280.0000.07721.07
5.6.210.0170.07720.66
5.6.200.0070.07318.22
5.6.190.0130.06720.39
5.6.180.3400.04020.64
5.6.170.0270.04020.38
5.6.160.0000.05720.47
5.6.150.0070.03318.16
5.6.140.0030.08718.15
5.6.130.0030.06318.21
5.6.120.0130.06720.98
5.6.110.0330.05020.95
5.6.100.0070.07321.13
5.6.90.0030.06021.10
5.6.80.0170.06720.48
5.6.70.3670.02720.52
5.5.350.0300.07720.34
5.5.340.0130.07717.88
5.5.330.0030.05020.23
5.5.320.0200.04320.27
5.5.310.0300.05020.50
5.5.300.0200.06317.91
5.5.290.0070.08017.93
5.5.280.0030.05720.95
5.5.270.0070.07720.93
5.5.260.0070.03720.87
5.5.250.0070.06020.43
5.5.240.0030.05720.36
5.4.450.1030.03719.46
5.4.440.0630.05319.54
5.4.430.0100.05319.45
5.4.420.0100.05319.68
5.4.410.0130.05019.35
5.4.400.0200.04019.03
5.4.390.0130.04718.92
5.4.380.0130.04719.16
5.4.370.0070.05319.12
5.4.360.0070.05019.09
5.4.350.0200.04019.06
5.4.340.0030.05718.96
5.4.320.0130.05319.01
5.4.310.0070.06019.07
5.4.300.0100.04719.15
5.4.290.0130.04319.25
5.4.280.0100.05019.25
5.4.270.0100.05018.95
5.4.260.0100.05019.06
5.4.250.0100.05318.95
5.4.240.0070.05318.97
5.4.230.0000.05719.04
5.4.220.0070.05718.98
5.4.210.0000.06019.05
5.4.200.0070.05016.59
5.4.190.0100.05018.95
5.4.180.0100.05019.01
5.4.170.0100.05019.04
5.4.160.0200.04019.06
5.4.150.0100.05018.92
5.4.140.0130.04716.20
5.4.130.0130.04316.36
5.4.120.0200.03716.36
5.4.110.0070.07016.22
5.4.100.0070.05316.41
5.4.90.0130.04716.20
5.4.80.0170.04016.36
5.4.70.0030.05316.50
5.4.60.0100.04716.39
5.4.50.0100.04716.38
5.4.40.0130.04716.18
5.4.30.0100.04716.48
5.4.20.0100.04716.46
5.4.10.0200.03716.49
5.4.00.0070.05015.95
5.3.290.0170.04714.64
5.3.280.0100.05014.62
5.3.270.0030.05714.45
5.3.260.0130.04714.39
5.3.250.0170.04014.52
5.3.240.0100.04714.39
5.3.230.0100.05014.38
5.3.220.0000.05714.54
5.3.210.0000.06014.45
5.3.200.0030.05314.46
5.3.190.0000.06014.60
5.3.180.0170.05314.56
5.3.170.0070.06314.55
5.3.160.0100.05014.50
5.3.150.0100.04714.41
5.3.140.0000.05714.58
5.3.130.0200.04014.49
5.3.120.0030.06314.46
5.3.110.0030.05714.46
5.3.100.0100.04713.92
5.3.90.0030.05314.02
5.3.80.0070.05014.00
5.3.70.0070.05013.93
5.3.60.0070.05013.84
5.3.50.0070.05013.89
5.3.40.0070.05013.80
5.3.30.0170.04013.77
5.3.20.0130.04313.69
5.3.10.0100.04313.63
5.3.00.0100.04713.49
5.2.170.0070.04011.04
5.2.160.0130.03010.99
5.2.150.0070.04311.15
5.2.140.0130.03311.04
5.2.130.0070.03711.00
5.2.120.0030.04011.02
5.2.110.0030.04010.95
5.2.100.0030.04011.02
5.2.90.0100.03311.02
5.2.80.0000.04710.95
5.2.70.0130.03311.01
5.2.60.0130.03310.95
5.2.50.0130.03311.09
5.2.40.0000.04310.86
5.2.30.0070.04011.06
5.2.20.0030.04010.97
5.2.10.0070.03711.01
5.2.00.0100.03710.70
5.1.60.0170.02310.15
5.1.50.0100.03010.04
5.1.40.0000.0379.83
5.1.30.0030.04310.50
5.1.20.0000.04310.27
5.1.10.0030.03710.00
5.1.00.0030.03710.07
5.0.50.0070.0278.71
5.0.40.0000.0308.46
5.0.30.0070.0408.16
5.0.20.0000.0308.09
5.0.10.0100.0238.24
5.0.00.0000.0478.09
4.4.90.0070.0205.78
4.4.80.0030.0275.93
4.4.70.0000.0235.80
4.4.60.0070.0175.87
4.4.50.0030.0205.86
4.4.40.0030.0335.83
4.4.30.0000.0235.82
4.4.20.0030.0205.93
4.4.10.0100.0135.83
4.4.00.0070.0305.81
4.3.110.0030.0205.75
4.3.100.0000.0235.84
4.3.90.0070.0175.82
4.3.80.0070.0405.67
4.3.70.0030.0205.82
4.3.60.0000.0235.68
4.3.50.0030.0205.68
4.3.40.0000.0375.81
4.3.30.0000.0234.56
4.3.20.0000.0234.54
4.3.10.0000.0234.38
4.3.00.0170.01716.19

preferences:
37.02 ms | 401 KiB | 5 Q