3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $query = 'SELECT COUNT( `orders`.order_id ) AS `cnt`, ' . '`orders`.`payment_type`, `orders`.`package_id`, `orders`.`country_id`, ' . '`payment_cost`.`cost`, `vat`, SUM(`orders`.`amount`) AS `omzet` ' . 'FROM `orders`, ' . 'WHERE `orders`.`status` IN(:success, :verified) ' . "AND DATE_FORMAT( `orders`.`payment_date` , '%m-%y' ) = :date " . 'AND `orders`.`payment_type`=`payment_cost`.`payment_type` ' . 'AND `orders`.`package_id`=`payment_cost`.`package_id` ' . 'AND `orders`.`country_id`=`payment_cost`.`country_id` ' . 'GROUP BY `orders`.`payment_type`, `orders`.`country_id`, `orders`.`package_id` ' . 'ORDER BY payment_type, country_id ASC'; echo $query;
based on i0R54
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
SELECT COUNT( `orders`.order_id ) AS `cnt`, `orders`.`payment_type`, `orders`.`package_id`, `orders`.`country_id`, `payment_cost`.`cost`, `vat`, SUM(`orders`.`amount`) AS `omzet` FROM `orders`, WHERE `orders`.`status` IN(:success, :verified) AND DATE_FORMAT( `orders`.`payment_date` , '%m-%y' ) = :date AND `orders`.`payment_type`=`payment_cost`.`payment_type` AND `orders`.`package_id`=`payment_cost`.`package_id` AND `orders`.`country_id`=`payment_cost`.`country_id` GROUP BY `orders`.`payment_type`, `orders`.`country_id`, `orders`.`package_id` ORDER BY payment_type, country_id ASC