3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Wrapper for PHP's DateTime class inspired by moment.js * * @author Tino Ehrich <ehrich@efides.com> * @version See composer.json * * @dependencies >= PHP 5.3.0 */ namespace Moment; class Moment extends \DateTime { /** @var string */ protected $_timezoneString; // ########################################## /** * @param string $dateTime * @param string $timezone */ public function __construct($dateTime = 'now', $timezone = 'UTC') { return $this->resetDateTime($dateTime, $timezone); } // ########################################## /** * @param string $timezoneString * * @return Moment */ protected function _setTimezoneString($timezoneString) { $this->_timezoneString = $timezoneString; return $this; } // ########################################## /** * @return string */ protected function _getTimezoneString() { return $this->_timezoneString; } // ########################################## /** * @param string $timezone * * @return \DateTimeZone */ protected function _getDateTimeZone($timezone) { return new \DateTimeZone($timezone); } // ########################################## /** * @param string $timezone * * @return \DateTime|Moment */ public function setTimezone($timezone) { $this->_setTimezoneString($timezone); parent::setTimezone($this->_getDateTimeZone($timezone)); return $this; } // ########################################## /** * @param string $dateTime * @param string $timezone * * @return Moment */ public function resetDateTime($dateTime = 'now', $timezone = 'UTC') { // cache timezone string $this->_setTimezoneString($timezone); // create instance parent::__construct($dateTime, $this->_getDateTimeZone($timezone)); return $this; } // ########################################## /** * @param null $format * @param null|FormatsInterface $formatsInterface * * @return string */ public function format($format = NULL, $formatsInterface = NULL) { // set default format if ($format === NULL) { $format = \DateTime::ISO8601; } // handle diverse format types if ($formatsInterface instanceof FormatsInterface) { $format = $formatsInterface->format($format); } return parent::format($format); } // ############################################ /** * @param string $type * @param int $value * * @return Moment */ public function add($type = 'day', $value = 1) { parent::modify('+' . $value . ' ' . $type); return $this; } // ############################################ /** * @param string $type * @param int $value * * @return Moment */ public function subtract($type = 'day', $value = 1) { parent::modify('-' . $value . ' ' . $type); return $this; } // ###################################### /** * @param string $dateTime * @param string $timezone * * @return MomentFromVo */ public function from($dateTime = 'now', $timezone = 'UTC') { $fromInstance = parent::diff(new Moment($dateTime, $timezone)); return (new MomentFromVo()) ->setDirection($fromInstance->format('%R')) ->setSeconds($this->_fromToSeconds($fromInstance)) ->setMinutes($this->_fromToMinutes($fromInstance)) ->setHours($this->_fromToHours($fromInstance)) ->setDays($this->_fromToDays($fromInstance)) ->setWeeks($this->_fromToWeeks($fromInstance)); } // ###################################### /** * @param string $timezone * * @return MomentFromVo */ public function fromNow($timezone = 'UTC') { return $this->from('now', $timezone); } // ###################################### /** * @param \DateInterval $dateInterval * * @return string */ protected function _fromToSeconds(\DateInterval $dateInterval) { return ($dateInterval->y * 365 * 24 * 60 * 60) + ($dateInterval->m * 30 * 24 * 60 * 60) + ($dateInterval->d * 24 * 60 * 60) + ($dateInterval->h * 60 * 60) + $dateInterval->s; } // ###################################### /** * @param \DateInterval $dateInterval * * @return string */ protected function _fromToMinutes(\DateInterval $dateInterval) { return $this->_fromToSeconds($dateInterval) / 60; } // ###################################### /** * @param \DateInterval $dateInterval * * @return string */ protected function _fromToHours(\DateInterval $dateInterval) { return $this->_fromToMinutes($dateInterval) / 60; } // ###################################### /** * @param \DateInterval $dateInterval * * @return string */ protected function _fromToDays(\DateInterval $dateInterval) { return $this->_fromToHours($dateInterval) / 24; } // ###################################### /** * @param \DateInterval $dateInterval * * @return string */ protected function _fromToWeeks(\DateInterval $dateInterval) { return $this->_fromToDays($dateInterval) / 7; } // ###################################### /** * @param $period * * @return MomentPeriodVo * @throws \Exception */ public function getPeriod($period) { switch ($period) { case 'week': $currentWeekDay = $this->format('N'); $start = (new Moment('@' . $this->format('U'))) ->setTimezone($this->_getTimezoneString()) ->subtract('day', $currentWeekDay - 1) ->setTime(0, 0, 0); $end = (new Moment('@' . $this->format('U'))) ->setTimezone($this->_getTimezoneString()) ->add('day', 7 - $currentWeekDay) ->setTime(23, 59, 59); break; // ------------------------------ case 'month': $maxMonthDays = $this->format('t'); $currentMonthDay = $this->format('j'); $start = (new Moment('@' . $this->format('U'))) ->setTimezone($this->_getTimezoneString()) ->subtract('day', $currentMonthDay - 1) ->setTime(0, 0, 0); $end = (new Moment('@' . $this->format('U'))) ->setTimezone($this->_getTimezoneString()) ->add('day', $maxMonthDays - $currentMonthDay) ->setTime(23, 59, 59); break; // ------------------------------ default: throw new \Exception("Period \"{$period}\" is not supported yet (supported are \"week\" and \"month\").", 500); } return (new MomentPeriodVo()) ->setRefDate($this) ->setStartDate($start) ->setEndDate($end); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  305     0  E > > RETURN                                                   1

Class Moment\Moment:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  __construct
number of ops:  8
compiled vars:  !0 = $dateTime, !1 = $timezone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV_INIT                                        !0      'now'
          1        RECV_INIT                                        !1      'UTC'
   27     2        INIT_METHOD_CALL                                         'resetDateTime'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $2      
          6      > RETURN                                                   $2
   28     7*     > RETURN                                                   null

End of function __construct

Function _settimezonestring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  _setTimezoneString
number of ops:  6
compiled vars:  !0 = $timezoneString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   RECV                                             !0      
   39     1        ASSIGN_OBJ                                               '_timezoneString'
          2        OP_DATA                                                  !0
   41     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   42     5*     > RETURN                                                   null

End of function _settimezonestring

Function _gettimezonestring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  _getTimezoneString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   51     0  E >   FETCH_OBJ_R                                      ~0      '_timezoneString'
          1      > RETURN                                                   ~0
   52     2*     > RETURN                                                   null

End of function _gettimezonestring

Function _getdatetimezone:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  _getDateTimeZone
number of ops:  6
compiled vars:  !0 = $timezone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   61     0  E >   RECV                                             !0      
   63     1        NEW                                              $1      'DateTimeZone'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   $1
   64     5*     > RETURN                                                   null

End of function _getdatetimezone

Function settimezone:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  setTimezone
number of ops:  13
compiled vars:  !0 = $timezone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   73     0  E >   RECV                                             !0      
   75     1        INIT_METHOD_CALL                                         '_setTimezoneString'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   77     4        INIT_STATIC_METHOD_CALL                                  'setTimezone'
          5        INIT_METHOD_CALL                                         '_getDateTimeZone'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR_NO_REF_EX                                       $2
          9        DO_FCALL                                      0          
   79    10        FETCH_THIS                                       ~4      
         11      > RETURN                                                   ~4
   80    12*     > RETURN                                                   null

End of function settimezone

Function resetdatetime:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  resetDateTime
number of ops:  15
compiled vars:  !0 = $dateTime, !1 = $timezone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   90     0  E >   RECV_INIT                                        !0      'now'
          1        RECV_INIT                                        !1      'UTC'
   93     2        INIT_METHOD_CALL                                         '_setTimezoneString'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0          
   96     5        INIT_STATIC_METHOD_CALL                                  
          6        SEND_VAR_EX                                              !0
          7        INIT_METHOD_CALL                                         '_getDateTimeZone'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $3      
         10        SEND_VAR_NO_REF_EX                                       $3
         11        DO_FCALL                                      0          
   98    12        FETCH_THIS                                       ~5      
         13      > RETURN                                                   ~5
   99    14*     > RETURN                                                   null

End of function resetdatetime

Function format:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
Branch analysis from position: 5
filename:       /in/rQ0K4
function name:  format
number of ops:  16
compiled vars:  !0 = $format, !1 = $formatsInterface
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  109     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
  112     2        TYPE_CHECK                                    2          !0
          3      > JMPZ                                                     ~2, ->5
  114     4    >   ASSIGN                                                   !0, 'Y-m-d%5CTH%3Ai%3AsO'
  118     5    >   INSTANCEOF                                               !1, 'Moment%5CFormatsInterface'
          6      > JMPZ                                                     ~4, ->11
  120     7    >   INIT_METHOD_CALL                                         !1, 'format'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $5      
         10        ASSIGN                                                   !0, $5
  123    11    >   INIT_STATIC_METHOD_CALL                                  'format'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0  $7      
         14      > RETURN                                                   $7
  124    15*     > RETURN                                                   null

End of function format

Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  add
number of ops:  11
compiled vars:  !0 = $type, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  134     0  E >   RECV_INIT                                        !0      'day'
          1        RECV_INIT                                        !1      1
  136     2        INIT_STATIC_METHOD_CALL                                  'modify'
          3        CONCAT                                           ~2      '%2B', !1
          4        CONCAT                                           ~3      ~2, '+'
          5        CONCAT                                           ~4      ~3, !0
          6        SEND_VAL_EX                                              ~4
          7        DO_FCALL                                      0          
  138     8        FETCH_THIS                                       ~6      
          9      > RETURN                                                   ~6
  139    10*     > RETURN                                                   null

End of function add

Function subtract:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  subtract
number of ops:  11
compiled vars:  !0 = $type, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  149     0  E >   RECV_INIT                                        !0      'day'
          1        RECV_INIT                                        !1      1
  151     2        INIT_STATIC_METHOD_CALL                                  'modify'
          3        CONCAT                                           ~2      '-', !1
          4        CONCAT                                           ~3      ~2, '+'
          5        CONCAT                                           ~4      ~3, !0
          6        SEND_VAL_EX                                              ~4
          7        DO_FCALL                                      0          
  153     8        FETCH_THIS                                       ~6      
          9      > RETURN                                                   ~6
  154    10*     > RETURN                                                   null

End of function subtract

Function from:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  from
number of ops:  50
compiled vars:  !0 = $dateTime, !1 = $timezone, !2 = $fromInstance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  164     0  E >   RECV_INIT                                        !0      'now'
          1        RECV_INIT                                        !1      'UTC'
  166     2        INIT_STATIC_METHOD_CALL                                  'diff'
          3        NEW                                              $3      'Moment%5CMoment'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $3
          8        DO_FCALL                                      0  $5      
          9        ASSIGN                                                   !2, $5
  168    10        NEW                                              $7      'Moment%5CMomentFromVo'
         11        DO_FCALL                                      0          
  169    12        INIT_METHOD_CALL                                         $7, 'setDirection'
         13        INIT_METHOD_CALL                                         !2, 'format'
         14        SEND_VAL_EX                                              '%25R'
         15        DO_FCALL                                      0  $9      
         16        SEND_VAR_NO_REF_EX                                       $9
         17        DO_FCALL                                      0  $10     
  170    18        INIT_METHOD_CALL                                         $10, 'setSeconds'
         19        INIT_METHOD_CALL                                         '_fromToSeconds'
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0  $11     
         22        SEND_VAR_NO_REF_EX                                       $11
         23        DO_FCALL                                      0  $12     
  171    24        INIT_METHOD_CALL                                         $12, 'setMinutes'
         25        INIT_METHOD_CALL                                         '_fromToMinutes'
         26        SEND_VAR_EX                                              !2
         27        DO_FCALL                                      0  $13     
         28        SEND_VAR_NO_REF_EX                                       $13
         29        DO_FCALL                                      0  $14     
  172    30        INIT_METHOD_CALL                                         $14, 'setHours'
         31        INIT_METHOD_CALL                                         '_fromToHours'
         32        SEND_VAR_EX                                              !2
         33        DO_FCALL                                      0  $15     
         34        SEND_VAR_NO_REF_EX                                       $15
         35        DO_FCALL                                      0  $16     
  173    36        INIT_METHOD_CALL                                         $16, 'setDays'
         37        INIT_METHOD_CALL                                         '_fromToDays'
         38        SEND_VAR_EX                                              !2
         39        DO_FCALL                                      0  $17     
         40        SEND_VAR_NO_REF_EX                                       $17
         41        DO_FCALL                                      0  $18     
  174    42        INIT_METHOD_CALL                                         $18, 'setWeeks'
         43        INIT_METHOD_CALL                                         '_fromToWeeks'
         44        SEND_VAR_EX                                              !2
         45        DO_FCALL                                      0  $19     
         46        SEND_VAR_NO_REF_EX                                       $19
         47        DO_FCALL                                      0  $20     
         48      > RETURN                                                   $20
  175    49*     > RETURN                                                   null

End of function from

Function fromnow:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  fromNow
number of ops:  7
compiled vars:  !0 = $timezone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  184     0  E >   RECV_INIT                                        !0      'UTC'
  186     1        INIT_METHOD_CALL                                         'from'
          2        SEND_VAL_EX                                              'now'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $1      
          5      > RETURN                                                   $1
  187     6*     > RETURN                                                   null

End of function fromnow

Function _fromtoseconds:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  _fromToSeconds
number of ops:  25
compiled vars:  !0 = $dateInterval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  196     0  E >   RECV                                             !0      
  198     1        FETCH_OBJ_R                                      ~1      !0, 'y'
          2        MUL                                              ~2      ~1, 365
          3        MUL                                              ~3      ~2, 24
          4        MUL                                              ~4      ~3, 60
          5        MUL                                              ~5      ~4, 60
          6        FETCH_OBJ_R                                      ~6      !0, 'm'
          7        MUL                                              ~7      ~6, 30
          8        MUL                                              ~8      ~7, 24
          9        MUL                                              ~9      ~8, 60
         10        MUL                                              ~10     ~9, 60
         11        ADD                                              ~11     ~5, ~10
         12        FETCH_OBJ_R                                      ~12     !0, 'd'
         13        MUL                                              ~13     ~12, 24
         14        MUL                                              ~14     ~13, 60
         15        MUL                                              ~15     ~14, 60
         16        ADD                                              ~16     ~11, ~15
         17        FETCH_OBJ_R                                      ~17     !0, 'h'
         18        MUL                                              ~18     ~17, 60
         19        MUL                                              ~19     ~18, 60
         20        ADD                                              ~20     ~16, ~19
         21        FETCH_OBJ_R                                      ~21     !0, 's'
         22        ADD                                              ~22     ~20, ~21
         23      > RETURN                                                   ~22
  199    24*     > RETURN                                                   null

End of function _fromtoseconds

Function _fromtominutes:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  _fromToMinutes
number of ops:  7
compiled vars:  !0 = $dateInterval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  208     0  E >   RECV                                             !0      
  210     1        INIT_METHOD_CALL                                         '_fromToSeconds'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4        DIV                                              ~2      $1, 60
          5      > RETURN                                                   ~2
  211     6*     > RETURN                                                   null

End of function _fromtominutes

Function _fromtohours:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  _fromToHours
number of ops:  7
compiled vars:  !0 = $dateInterval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  220     0  E >   RECV                                             !0      
  222     1        INIT_METHOD_CALL                                         '_fromToMinutes'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4        DIV                                              ~2      $1, 60
          5      > RETURN                                                   ~2
  223     6*     > RETURN                                                   null

End of function _fromtohours

Function _fromtodays:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  _fromToDays
number of ops:  7
compiled vars:  !0 = $dateInterval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  232     0  E >   RECV                                             !0      
  234     1        INIT_METHOD_CALL                                         '_fromToHours'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4        DIV                                              ~2      $1, 24
          5      > RETURN                                                   ~2
  235     6*     > RETURN                                                   null

End of function _fromtodays

Function _fromtoweeks:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ0K4
function name:  _fromToWeeks
number of ops:  7
compiled vars:  !0 = $dateInterval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  244     0  E >   RECV                                             !0      
  246     1        INIT_METHOD_CALL                                         '_fromToDays'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4        DIV                                              ~2      $1, 7
          5      > RETURN                                                   ~2
  247     6*     > RETURN                                                   null

End of function _fromtoweeks

Function getperiod:
Finding entry points
Branch analysis from position: 0
4 jumps found. (Code = 188) Position 1 = 7, Position 2 = 58, Position 3 = 113, Position 4 = 2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 121
Branch analysis from position: 121
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 58
1 jumps found. (Code = 42) Position 1 = 121
Branch analysis from position: 121
Branch analysis from position: 113
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 58
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 113
Branch analysis from position: 113
Branch analysis from position: 58
Branch analysis from position: 7
filename:       /in/rQ0K4
function name:  getPeriod
number of ops:  135
compiled vars:  !0 = $period, !1 = $currentWeekDay, !2 = $start, !3 = $end, !4 = $maxMonthDays, !5 = $currentMonthDay
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  257     0  E >   RECV                                             !0      
  259     1      > SWITCH_STRING                                            !0, [ 'week':->7, 'month':->58, ], ->113
  261     2    >   IS_EQUAL                                                 !0, 'week'
          3      > JMPNZ                                                    ~6, ->7
  278     4    >   IS_EQUAL                                                 !0, 'month'
          5      > JMPNZ                                                    ~6, ->58
          6    > > JMP                                                      ->113
  262     7    >   INIT_METHOD_CALL                                         'format'
          8        SEND_VAL_EX                                              'N'
          9        DO_FCALL                                      0  $7      
         10        ASSIGN                                                   !1, $7
  264    11        NEW                                              $9      'Moment%5CMoment'
         12        INIT_METHOD_CALL                                         'format'
         13        SEND_VAL_EX                                              'U'
         14        DO_FCALL                                      0  $10     
         15        CONCAT                                           ~11     '%40', $10
         16        SEND_VAL_EX                                              ~11
         17        DO_FCALL                                      0          
  265    18        INIT_METHOD_CALL                                         $9, 'setTimezone'
         19        INIT_METHOD_CALL                                         '_getTimezoneString'
         20        DO_FCALL                                      0  $13     
         21        SEND_VAR_NO_REF_EX                                       $13
         22        DO_FCALL                                      0  $14     
  266    23        INIT_METHOD_CALL                                         $14, 'subtract'
         24        SEND_VAL_EX                                              'day'
         25        SUB                                              ~15     !1, 1
         26        SEND_VAL_EX                                              ~15
         27        DO_FCALL                                      0  $16     
  267    28        INIT_METHOD_CALL                                         $16, 'setTime'
         29        SEND_VAL_EX                                              0
         30        SEND_VAL_EX                                              0
         31        SEND_VAL_EX                                              0
         32        DO_FCALL                                      0  $17     
  264    33        ASSIGN                                                   !2, $17
  269    34        NEW                                              $19     'Moment%5CMoment'
         35        INIT_METHOD_CALL                                         'format'
         36        SEND_VAL_EX                                              'U'
         37        DO_FCALL                                      0  $20     
         38        CONCAT                                           ~21     '%40', $20
         39        SEND_VAL_EX                                              ~21
         40        DO_FCALL                                      0          
  270    41        INIT_METHOD_CALL                                         $19, 'setTimezone'
         42        INIT_METHOD_CALL                                         '_getTimezoneString'
         43        DO_FCALL                                      0  $23     
         44        SEND_VAR_NO_REF_EX                                       $23
         45        DO_FCALL                                      0  $24     
  271    46        INIT_METHOD_CALL                                         $24, 'add'
         47        SEND_VAL_EX                                              'day'
         48        SUB                                              ~25     7, !1
         49        SEND_VAL_EX                                              ~25
         50        DO_FCALL                                      0  $26     
  272    51        INIT_METHOD_CALL                                         $26, 'setTime'
         52        SEND_VAL_EX                                              23
         53        SEND_VAL_EX                                              59
         54        SEND_VAL_EX                                              59
         55        DO_FCALL                                      0  $27     
  269    56        ASSIGN                                                   !3, $27
  274    57      > JMP                                                      ->121
  279    58    >   INIT_METHOD_CALL                                         'format'
         59        SEND_VAL_EX                                              't'
         60        DO_FCALL                                      0  $29     
         61        ASSIGN                                                   !4, $29
  280    62        INIT_METHOD_CALL                                         'format'
         63        SEND_VAL_EX                                              'j'
         64        DO_FCALL                                      0  $31     
         65        ASSIGN                                                   !5, $31
  282    66        NEW                                              $33     'Moment%5CMoment'
         67        INIT_METHOD_CALL                                         'format'
         68        SEND_VAL_EX                                              'U'
         69        DO_FCALL                                      0  $34     
         70        CONCAT                                           ~35     '%40', $34
         71        SEND_VAL_EX                                              ~35
         72        DO_FCALL                                      0          
  283    73        INIT_METHOD_CALL                                         $33, 'setTimezone'
         74        INIT_METHOD_CALL                                         '_getTimezoneString'
         75        DO_FCALL                                      0  $37     
         76        SEND_VAR_NO_REF_EX                                       $37
         77        DO_FCALL                                      0  $38     
  284    78        INIT_METHOD_CALL                                         $38, 'subtract'
         79        SEND_VAL_EX                                              'day'
         80        SUB                                              ~39     !5, 1
         81        SEND_VAL_EX                                              ~39
         82        DO_FCALL                                      0  $40     
  285    83        INIT_METHOD_CALL                                         $40, 'setTime'
         84        SEND_VAL_EX                                              0
         85        SEND_VAL_EX                                              0
         86        SEND_VAL_EX                                              0
         87        DO_FCALL                                      0  $41     
  282    88        ASSIGN                                                   !2, $41
  287    89        NEW                                              $43     'Moment%5CMoment'
         90        INIT_METHOD_CALL                                         'format'
         91        SEND_VAL_EX                                              'U'
 

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
280.91 ms | 1427 KiB | 14 Q