<?php echo preg_replace('/([^:]*):/i', '"$1" :', 'def1: "some explanation"\n');
Standard input is empty
"def1" : "some explanation"\n
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!