<?php $q = ',q, w, r,'; echo implode(' ', array_map(function($d) { return '<span>'.trim($d).'</span>';}, explode(',', trim($q, ','))));
Standard input is empty
<span>q</span> <span>w</span> <span>r</span>
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!