Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can php source code package a library like the java .jar?

I package my source code in Java using .jar. Is there any things like that in php?? Thank you.

like image 995
Tattat Avatar asked Jun 09 '11 13:06

Tattat


People also ask

What is the difference between jar and package?

A package is a mechanism in Java for organizing classes into namespaces. A jar is a Java ARchive, a file that aggregates multiple Java classes into one.

Can we use PHP with Java?

There are two possible ways to bridge PHP and Java: you can either integrate PHP into a Java Servlet environment, which is the more stable and efficient solution, or integrate Java support into PHP. The former is provided by a SAPI module that interfaces with the Servlet server, the latter by this Java extension.


3 Answers

The closest thing PHP is Phar: http://php.net/manual/en/book.phar.php

like image 66
datasage Avatar answered Sep 28 '22 10:09

datasage


there is phar.

http://www.php.net/manual/en/intro.phar.php

like image 33
mjspier Avatar answered Sep 28 '22 10:09

mjspier


There are two:

bcompiler and phar

I actually asked a question regarding these, but I don't remember getting too many useful responses.

like image 36
cwallenpoole Avatar answered Sep 28 '22 11:09

cwallenpoole