If we are talking XF specifically, then it is PHP, and anyone can see the code for that matter, however that doesn't mean it was available for reproduction, that changed after I abandoned it and allowed anyone to continue development as long as they ask me once.
You can license the code ofcourse, like say GPL or CC or Apache or whatever the hell you please.EULA though might require you to be a corporate entity.