Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 484 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 484 Bytes

PHP Global Var

This project supports replacement into old PHP code written with abuse of global directive, and give a strategy to step by step remove and refacoty code in a modern way.

Installation

composer require javanile/php-global-var

Usage

<?php

function getNewEntity() 
{
   // Replace the following line
   global $entityManager;
   // With `get_global_var` call
   $entityManager = get_global_var('entityManager');
   
   .
   .
   .
}