Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Shared libraries in PHP

Im working on a few php based projects and im having an issue of having to maintain separate code bases with common code. The common code shared amongst all the projects is added physically (file are copied in the folder) and when a change is needed we have to manually replicate the fixes in the common code functionality in each project.

In java we can create a library (jar file) and share it among different projects. Is there any shared library related concept available in PHP 5.

like image 628
Nauman Bashir Avatar asked Feb 12 '26 07:02

Nauman Bashir


1 Answers

PHP's version of a jar is called Phar: http://php.net/manual/en/book.phar.php

like image 141
Rob Olmos Avatar answered Feb 15 '26 06:02

Rob Olmos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!