top | item 45716186

"use php"

3 points| sawirricardo | 4 months ago |twitter.com

1 comment

order

al_borland|4 months ago

PHP is often mixed into files that contain other languages. Even in the example, the PHP is in a JavaScript file. How does “use php” alone tell the system what is PHP and what might be another language.

It would be nice to be able to use PHP in a file that has the file extension for the primary code it contains, like HTML, but it still seems like there needs to be a way to define where one language ends and other begins.