Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can a programming language be both client and server side?

What I mean is basically for example PHP, PHP can be used both to output data onto the client/browser and to connect/query databases.

Would it then be both a client side and a server side programming language?

Or is it still a server-side language as it's main use is database querying

Javascript too, js can be used as a client side language which is what it is but it can also be used to establish a connection to a database, does that then make it both a server and client side programming language?

thanks.

like image 880
SebastianZdroana Avatar asked Dec 17 '15 14:12

SebastianZdroana


1 Answers

PHP's technically a "client" of your MySQL server, but "client side" in web development refers to code that runs on your user's web browser. PHP is an exclusively server-side technology (barring oddities like PHP-GTK).

JavaScript is both client-side (in browser) and server-side (via Node).

like image 174
ceejayoz Avatar answered Sep 28 '22 00:09

ceejayoz