Skip to main content

A DateTimePeriod library for working with temporal intervals php training trivandrum

Requirements

Installation

$ composer require pwm/datetime-period

Usage

Creation:
Restrictions:
The full set of relations between 2 periods:
Working with different granularities:

How it works

Definitions

1. Instant
2. Interval
3. Period

Relations

Tests

$ vendor/bin/phpunit
$ vendor/bin/phpstan analyse -l 7 src

Changelog

Comments

Popular posts from this blog

Memory leak in 7.x json_decode()? Best Php Training Trivandrum

Memory leak in 7.x json_decode()? There appears to be a memory leak in 7.x json_decode(). I've uploaded a huge JSON file to demonstrate the problem. Here is the sample code: <?php echo memory_get_usage(false) . ' : ' .memory_get_usage(true) . PHP_EOL; $json = json_decode(file_get_contents('http://zaremedia.com/big.json')); echo memory_get_usage(false) . ' : ' .memory_get_usage(true) . PHP_EOL; unset($json); echo memory_get_usage(false) . ' : ' .memory_get_usage(true) . PHP_EOL; Below is output from 7.x and then 5.6: // Running on 7.0 and 7.1 349608 : 2097152 27245512 : 29360128 375552 : 29360128 The process starts with 0.3mb used / 2.0mb allocated. After json_decode(), it's 27.2 / 29.4mb, after unset, it's 3.7mb / 29.4mb -- The second value (memory allocated by php via emalloc()) has not been freed, though PHP's gc has correctly freed up the object usage. // Running on 5.6 221136 : 262144 31577064 : 35913728 420104 : 86507

How do I deploy my Symfony API - - Deploy best php training trivandrum

How do I deploy my Symfony API -  - Deploy This is the forth post from a series of posts that will describe the whole deploy process from development to production.  The first article is available  here , the second  here  and the third  here . After covering the steps 1-3 and having prepared our infrastructure, we can see how to  deploy  our application to production. Almost the same approach can be used to deploy not only to production but also to test environments. Workflow Different "git push" operation should trigger different actions. Just as example a push to  master  should trigger a deploy to production, while other branches may trigger a deploy to a test environment, or not trigger deploys at all. I've used  Circe CI Workflows  to manage this set of decisions. Workflows are just another section from the same  .circleci/config.yml  file and here they are: workflows: version: 2 build_and_deploy-workflow: jobs: - build - d