It may be permissible to legally use Google Maps for free if A) your mapping functionality is freely available and B) you are willing to use Google Maps client-side.
–
BrianJun 22 '12 at 14:40

@Brian basically correct although there are other provisions in Google's terms and conditions. You must have a privacy policy, no adult content, Google have the right to show ads in the map images, Google have a permanent worldwide license to any content you show on Google Maps, special restrictions for US government use, you must not do anything that in Google's opinion damages their brand. Etc.
–
MarkJJun 23 '12 at 11:18

It is a good idea to look at the licensing requirements for any tool or language you are using. I have seen some companies try to use the free, demo, or student edition of a tool to make a product they will be selling.

In many cases they wasted more labor dollars trying to trick the system than they would have spent to purchase the tool.

Some of software licenses will restrict your ability to create a .dll or will limit the number of transactions you can do per day or per hour. Some will restrict the number of users, or the amount of storage you can use.

Some will make you register your software in order to increase the rate. Some will start charging you based on the resources you are consuming.

PHP is basically an interpreted language designed to add more features to the classic http-daemon-server, "PHP" also could stand for the "interpreter or preprocessor" and in this case there are more than one piece of software related to the PHP world.
As reported in this page ( link below ) the big part of PHP is release under a so called "PHP license" but some components have a different license, you have to parse all the source code that you are using to be sure about the license information, at least give a look at the top of each file.
http://it2.php.net/license/index.php

JAVA is a GPL project from the 2007, the entire JDK is released under GPL terms except for very few components en.wikipedia.org/wiki/Java_%28software_platform%29
java.com/en/download/faq/distribution.xml

For Google Maps you probably have to pay, it's not free for commercial use and the APIs require a key/password that identify the developer that is using them

keep in mind that this is all about the languages, interpreter, different implementations of the same language, classes, libraries and other software-related chapters are completely different animals.
For example most of the time the use of a simple logo is regulated under a different and more restrictive license.

NB: This information may vary from place to place, but is to the best of my knowledge accurate across all Berne Convention signatories (which is most of the civilised world). However, I'm not a lawyer; all I'm doing is espousing my knowledge to date. If this information is critical to your business, hire a lawyer who specialises in this.

The simple rule is: unless you have a good reason not to, assume that someone else owns whatever it is you're trying to use, and that you require permission to use it.

Programs, such as the operating system you use, the editors/IDEs you use, any compilers you use, the web server you use, the database software you use, etc., will require you to have a licence. Some of these may be available free of charge. Some will not. Some may have additional terms of use (e.g. you may not be able to use your compiler to develop a competing compiler.)

External services, such as Google Maps, will require a licence. This may (and probably will) require payment.

For more details, you need to look at the terms and conditions of each product individually. If you cannot find the terms and conditions for a product, the safe bet is that you're not allowed to use it.