3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $sql = "(select count(*) from rateexport where rateexport.`block # rate` > 0) as #," . PHP_EOL; for ($x = 0; $x < 31; $x++) { echo str_replace("#", $x, $sql); }
based on Gn2Wi
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.2.0
(select count(*) from rateexport where rateexport.`block 0 rate` > 0) as 0, (select count(*) from rateexport where rateexport.`block 1 rate` > 0) as 1, (select count(*) from rateexport where rateexport.`block 2 rate` > 0) as 2, (select count(*) from rateexport where rateexport.`block 3 rate` > 0) as 3, (select count(*) from rateexport where rateexport.`block 4 rate` > 0) as 4, (select count(*) from rateexport where rateexport.`block 5 rate` > 0) as 5, (select count(*) from rateexport where rateexport.`block 6 rate` > 0) as 6, (select count(*) from rateexport where rateexport.`block 7 rate` > 0) as 7, (select count(*) from rateexport where rateexport.`block 8 rate` > 0) as 8, (select count(*) from rateexport where rateexport.`block 9 rate` > 0) as 9, (select count(*) from rateexport where rateexport.`block 10 rate` > 0) as 10, (select count(*) from rateexport where rateexport.`block 11 rate` > 0) as 11, (select count(*) from rateexport where rateexport.`block 12 rate` > 0) as 12, (select count(*) from rateexport where rateexport.`block 13 rate` > 0) as 13, (select count(*) from rateexport where rateexport.`block 14 rate` > 0) as 14, (select count(*) from rateexport where rateexport.`block 15 rate` > 0) as 15, (select count(*) from rateexport where rateexport.`block 16 rate` > 0) as 16, (select count(*) from rateexport where rateexport.`block 17 rate` > 0) as 17, (select count(*) from rateexport where rateexport.`block 18 rate` > 0) as 18, (select count(*) from rateexport where rateexport.`block 19 rate` > 0) as 19, (select count(*) from rateexport where rateexport.`block 20 rate` > 0) as 20, (select count(*) from rateexport where rateexport.`block 21 rate` > 0) as 21, (select count(*) from rateexport where rateexport.`block 22 rate` > 0) as 22, (select count(*) from rateexport where rateexport.`block 23 rate` > 0) as 23, (select count(*) from rateexport where rateexport.`block 24 rate` > 0) as 24, (select count(*) from rateexport where rateexport.`block 25 rate` > 0) as 25, (select count(*) from rateexport where rateexport.`block 26 rate` > 0) as 26, (select count(*) from rateexport where rateexport.`block 27 rate` > 0) as 27, (select count(*) from rateexport where rateexport.`block 28 rate` > 0) as 28, (select count(*) from rateexport where rateexport.`block 29 rate` > 0) as 29, (select count(*) from rateexport where rateexport.`block 30 rate` > 0) as 30,
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0tV62 on line 2 (select count(*) from rateexport where rateexport.`block 0 rate` > 0) as 0,PHP_EOL(select count(*) from rateexport where rateexport.`block 1 rate` > 0) as 1,PHP_EOL(select count(*) from rateexport where rateexport.`block 2 rate` > 0) as 2,PHP_EOL(select count(*) from rateexport where rateexport.`block 3 rate` > 0) as 3,PHP_EOL(select count(*) from rateexport where rateexport.`block 4 rate` > 0) as 4,PHP_EOL(select count(*) from rateexport where rateexport.`block 5 rate` > 0) as 5,PHP_EOL(select count(*) from rateexport where rateexport.`block 6 rate` > 0) as 6,PHP_EOL(select count(*) from rateexport where rateexport.`block 7 rate` > 0) as 7,PHP_EOL(select count(*) from rateexport where rateexport.`block 8 rate` > 0) as 8,PHP_EOL(select count(*) from rateexport where rateexport.`block 9 rate` > 0) as 9,PHP_EOL(select count(*) from rateexport where rateexport.`block 10 rate` > 0) as 10,PHP_EOL(select count(*) from rateexport where rateexport.`block 11 rate` > 0) as 11,PHP_EOL(select count(*) from rateexport where rateexport.`block 12 rate` > 0) as 12,PHP_EOL(select count(*) from rateexport where rateexport.`block 13 rate` > 0) as 13,PHP_EOL(select count(*) from rateexport where rateexport.`block 14 rate` > 0) as 14,PHP_EOL(select count(*) from rateexport where rateexport.`block 15 rate` > 0) as 15,PHP_EOL(select count(*) from rateexport where rateexport.`block 16 rate` > 0) as 16,PHP_EOL(select count(*) from rateexport where rateexport.`block 17 rate` > 0) as 17,PHP_EOL(select count(*) from rateexport where rateexport.`block 18 rate` > 0) as 18,PHP_EOL(select count(*) from rateexport where rateexport.`block 19 rate` > 0) as 19,PHP_EOL(select count(*) from rateexport where rateexport.`block 20 rate` > 0) as 20,PHP_EOL(select count(*) from rateexport where rateexport.`block 21 rate` > 0) as 21,PHP_EOL(select count(*) from rateexport where rateexport.`block 22 rate` > 0) as 22,PHP_EOL(select count(*) from rateexport where rateexport.`block 23 rate` > 0) as 23,PHP_EOL(select count(*) from rateexport where rateexport.`block 24 rate` > 0) as 24,PHP_EOL(select count(*) from rateexport where rateexport.`block 25 rate` > 0) as 25,PHP_EOL(select count(*) from rateexport where rateexport.`block 26 rate` > 0) as 26,PHP_EOL(select count(*) from rateexport where rateexport.`block 27 rate` > 0) as 27,PHP_EOL(select count(*) from rateexport where rateexport.`block 28 rate` > 0) as 28,PHP_EOL(select count(*) from rateexport where rateexport.`block 29 rate` > 0) as 29,PHP_EOL(select count(*) from rateexport where rateexport.`block 30 rate` > 0) as 30,PHP_EOL