3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //echo sprintf("CONCAT(product.%1s, (case when product.%1s != '' then CONCAT(' - ',product.%1s) else '' end), (case when product.%1s != '' then CONCAT(' - ',product.%1s) else '' end))", "name"); echo sprintf('CONCAT(product.%1$s, (case when product.%2$s != '' then CONCAT(' - ',product.%2$s) else '' end), (case when product.size != '' then CONCAT(' - ',product.size) else '' end))', "name", "color");
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '' then CONCAT('' (T_CONSTANT_ENCAPSED_STRING) in /in/c8Y5k on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/c8Y5k on line 4
Process exited with code 255.