Skip to main content

Posts

Showing posts with the label php codes

PHP-FPM tuning: Using ‘pm static’ for max performance best php training trivandrum

PHP-FPM tuning: Using ‘pm static’ for max performance Lets take a very quick look at how best to setup PHP-FPM for high throughput, low latency and a more stable use of CPU and memory. By default, most setups have PHP-FPM’s PM (process manager) string set to  dynamic  and there’s also the common advice to use  ondemand  if you suffer from available memory issues. However, lets compare the two management options based on php.net’s documentation and also compare my favorite for high traffic setups…  static  pm: pm = dynamic  – the number of child processes is set dynamically based on the following directives:  pm.max_children, pm.start_servers,pm.min_spare_servers, pm.max_spare_servers . pm = ondemand  – the processes spawn on demand (when requested, as opposed to dynamic, where pm.start_servers are started when the service is started. pm = static  – the number of child processes is fixed by...

A DateTimePeriod library for working with temporal intervals php training trivandrum

An implementation of the datetime period type for working with temporal intervals. The library includes the full set of relations on intervals defined by  Allen's Interval Algebra . For further information see the "Usage" and "How it works" paragraphs. Requirements PHP 7.1+ Installation $ composer require pwm/datetime-period Usage Creation: $start = new DateTimeImmutable ( ' 2010-10-10T10:10:10+00:00 ' ); $end = new DateTimeImmutable ( ' 2011-11-11T11:11:11+00:00 ' ); $period = new DateTimePeriod ( $start , $end ); // Start/end instants and their interval $start = $period -> getStart(); // DateTimeImmutable('2010-10-10T10:10:10+00:00') $end = $period -> getEnd(); // DateTimeImmutable('2011-11-11T11:11:11+00:00') $interval = $period -> getInterval(); // DateInterval('P1Y1M1DT1H1M1S') Restrictions: // Throws TimeZoneMismatch exception new DateTimePeriod ( new Da...

churn-php best php training trivandrum top php training trivandrum soddisfare

churn-php What is it? churn-php  is a package that helps you identify php files in your project that could be good candidates for refactoring. It examines each PHP file in the path it is provided and: Checks how many commits it has. Calculates the cyclomatic complexity. Creates a score based on these two values. The results are displayed in a table: A file that changes a lot and has a high complexity might be a better candidate for refactoring than a file that doesn't change a lot and has a low complexity. churn-php  only assists the developer to identify files for refactoring. It's best to use the results in addition to your own judgment to decide which files you may want to refactor. Compatibility PHP 7+ Currently does not work on Windows command line. See  #71  for more details. Your project uses Git as version control system. If you want to install  churn-php  in Symfony project, your Symfony components version must be 3.3 o...