3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Zend\Stdlib; if(version_compare(PHP_VERSION,'5.3.0','<')) exit; use DateTimeZone; class DateTime extends \DateTime { public function __construct($time = 'now', DateTimeZone $timezone = null) { // Workaround not required for PHP 5.3.7 or newer if (version_compare(PHP_VERSION, '5.3.7', '>=')) { return parent::__construct($time, $timezone); } // Check if using relative constructs if (!stristr($time, 'last') && !stristr($time, 'first')) { if ($timezone) { return parent::__construct($time, $timezone); } else { return parent::__construct($time); } } // Use current time with constructor to prevent setting 'first_last_day_of' flag. // The branching is required for older PHP to prevent DateTime exception of null timezone. if ($timezone) { parent::__construct('now', $timezone); } else { parent::__construct('now'); } // Set the timestamp by relying on strtotime and avoiding setting the // internal 'first_last_day_of' flag of DateTime object. $this->setTimestamp( strtotime($time, $this->getTimestamp()) ); return $this; } public function modify($modify) { // Workaround not required for PHP 5.3.7 or newer if (version_compare(PHP_VERSION, '5.3.7', '>=')) { return parent::modify($modify); } // Check if using relative constructs if (!stristr($modify, 'last') && !stristr($modify, 'first')) { return parent::modify($modify); } // Set the timestamp by relying on strtotime and avoiding setting the // internal 'first_last_day_of' flag of DateTime object. $parsedTimestamp = strtotime($modify, $this->getTimestamp()); if ($parsedTimestamp === false) { return false; // something went wrong parsing the date } $this->setTimestamp($parsedTimestamp); return $this; } } class classDateTimeTest { protected $revertTz = null; public function setup(){} public function teardown(){ if($this->revertTz){ date_default_timezone_set($this->revertTz); $this->revertTz = null; } } protected function setDefaultTz($tz){ if(!$this->revertTz){ $this->revertTz = date_default_timezone_get(); date_default_timezone_set($tz); } } /** * PHP Bug #62896 Unixtimestamp may take on local times DST flag (this test will only be valid during CEST) * PHP Bug #62561 DateTime add 'P1D' adds 25 hours * * @link https://bugs.php.net/bug.php?id=62896 * @link https://bugs.php.net/bug.php?id=62561 */ public function testBug62896and62561() { $this->setDefaultTz('Europe/Amsterdam'); $tz = new DateTimeZone('Europe/Berlin'); $date = new DateTime('@'.strtotime('2012-08-22 00:00:00 CEST')); $this->assertEquals( '2012-08-21 22:00:00 GMT+0000 (offset 0)', $date->format('Y-m-d H:i:s T').' (offset '.$date->getOffset().")", 'default tz is Amsterdam, date from timestamp, no timezone, after +0 days' ); $date->modify('+0 days'); $this->assertEquals( '2012-08-21 22:00:00 GMT+0000 (offset 0)', $date->format('Y-m-d H:i:s T').' (offset '.$date->getOffset().")", 'default tz is Amsterdam, date from timestamp, no timezone, after +0 days' ); $date = new DateTime('@'.strtotime('2012-08-22 00:00:00 CEST')); $date->setTimezone($tz); $this->assertEquals( '2012-08-22 00:00:00 CEST (offset 7200)', $date->format('Y-m-d H:i:s T').' (offset '.$date->getOffset().")", 'default tz is Amsterdam, date from timestamp, with timezone' ); $date->modify('+0 days'); $this->assertEquals( '2012-08-22 00:00:00 CEST (offset 7200)', $date->format('Y-m-d H:i:s T').' (offset '.$date->getOffset().")", 'default tz is Amsterdam, date from timestamp, with timezone, after +0 days' ); $date = new DateTime('2012-08-22 00:00:00 CEST', $tz); $this->assertEquals( '2012-08-22 00:00:00 CEST (offset 7200)', $date->format('Y-m-d H:i:s T').' (offset '.$date->getOffset().")", 'default tz is Amsterdam, date from a string, with timezone' ); $date->modify('+0 days'); $date = new DateTime('2012-08-22 00:00:00 CEST', $tz); $this->assertEquals( '2012-08-22 00:00:00 CEST (offset 7200)', $date->format('Y-m-d H:i:s T').' (offset '.$date->getOffset().")", 'default tz is Amsterdam, date from a string, with timezone, after +0 days' ); } protected function assertEquals($a, $b, $message = null){ if($a != $b){ throw new \Exception(($message ? $message : "" ) . "\"$a\" != \"$b\"\n"); } } } // run tests $testClass = new \ReflectionClass(__NAMESPACE__.'\classDateTimeTest'); foreach($testClass->getMethods() as $method){ if(substr($method->getShortName(),0, 4) !== 'test') continue; try{ $test = new classDateTimeTest(); $test->setup(); $method->invoke($test); $test->teardown(); }catch(\Exception $e){ echo 'FAIL: '.$method->getShortName().': '.$e->getMessage()."\n"; try{ $test->teardown(); }catch(\Exception $e){} continue; } echo 'PASS: '.$method->getShortName()."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 58
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 58
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 58
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 58
Found catch point at position: 37
Branch analysis from position: 37
2 jumps found. (Code = 107) Position 1 = 38, Position 2 = -2
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Found catch point at position: 50
Branch analysis from position: 50
2 jumps found. (Code = 107) Position 1 = 51, Position 2 = -2
Branch analysis from position: 51
filename:       /in/7CJod
function name:  (null)
number of ops:  60
compiled vars:  !0 = $testClass, !1 = $method, !2 = $test, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cversion_compare'
          1        FETCH_CONSTANT                                   ~4      'Zend%5CStdlib%5CPHP_VERSION'
          2        SEND_VAL_EX                                              ~4
          3        SEND_VAL_EX                                              '5.3.0'
          4        SEND_VAL_EX                                              '%3C'
          5        DO_FCALL                                      0  $5      
          6      > JMPZ                                                     $5, ->8
          7    > > EXIT                                                     
  148     8    >   NEW                                              $6      'ReflectionClass'
          9        SEND_VAL_EX                                              'Zend%5CStdlib%5CclassDateTimeTest'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !0, $6
  149    12        INIT_METHOD_CALL                                         !0, 'getMethods'
         13        DO_FCALL                                      0  $9      
         14      > FE_RESET_R                                       $10     $9, ->58
         15    > > FE_FETCH_R                                               $10, !1, ->58
  150    16    >   INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Csubstr'
         17        INIT_METHOD_CALL                                         !1, 'getShortName'
         18        DO_FCALL                                      0  $11     
         19        SEND_VAR_NO_REF_EX                                       $11
         20        SEND_VAL_EX                                              0
         21        SEND_VAL_EX                                              4
         22        DO_FCALL                                      0  $12     
         23        IS_NOT_IDENTICAL                                         $12, 'test'
         24      > JMPZ                                                     ~13, ->26
         25    > > JMP                                                      ->15
  152    26    >   NEW                                              $14     'Zend%5CStdlib%5CclassDateTimeTest'
         27        DO_FCALL                                      0          
         28        ASSIGN                                                   !2, $14
  153    29        INIT_METHOD_CALL                                         !2, 'setup'
         30        DO_FCALL                                      0          
  154    31        INIT_METHOD_CALL                                         !1, 'invoke'
         32        SEND_VAR_EX                                              !2
         33        DO_FCALL                                      0          
  155    34        INIT_METHOD_CALL                                         !2, 'teardown'
         35        DO_FCALL                                      0          
         36      > JMP                                                      ->52
  156    37  E > > CATCH                                       last         'Exception'
  157    38    >   INIT_METHOD_CALL                                         !1, 'getShortName'
         39        DO_FCALL                                      0  $20     
         40        CONCAT                                           ~21     'FAIL%3A+', $20
         41        CONCAT                                           ~22     ~21, '%3A+'
         42        INIT_METHOD_CALL                                         !3, 'getMessage'
         43        DO_FCALL                                      0  $23     
         44        CONCAT                                           ~24     ~22, $23
         45        CONCAT                                           ~25     ~24, '%0A'
         46        ECHO                                                     ~25
  159    47        INIT_METHOD_CALL                                         !2, 'teardown'
         48        DO_FCALL                                      0          
         49      > JMP                                                      ->51
  160    50  E > > CATCH                                       last         'Exception'
  161    51    > > JMP                                                      ->15
  163    52    >   INIT_METHOD_CALL                                         !1, 'getShortName'
         53        DO_FCALL                                      0  $27     
         54        CONCAT                                           ~28     'PASS%3A+', $27
         55        CONCAT                                           ~29     ~28, '%0A'
         56        ECHO                                                     ~29
  149    57      > JMP                                                      ->15
         58    >   FE_FREE                                                  $10
  164    59      > RETURN                                                   1

Class Zend\Stdlib\DateTime:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 38
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 34
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 44
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/7CJod
function name:  __construct
number of ops:  59
compiled vars:  !0 = $time, !1 = $timezone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV_INIT                                        !0      'now'
          1        RECV_INIT                                        !1      null
   12     2        INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cversion_compare'
          3        FETCH_CONSTANT                                   ~2      'Zend%5CStdlib%5CPHP_VERSION'
          4        SEND_VAL_EX                                              ~2
          5        SEND_VAL_EX                                              '5.3.7'
          6        SEND_VAL_EX                                              '%3E%3D'
          7        DO_FCALL                                      0  $3      
          8      > JMPZ                                                     $3, ->14
   13     9    >   INIT_STATIC_METHOD_CALL                                  
         10        SEND_VAR_EX                                              !0
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0  $4      
         13      > RETURN                                                   $4
   17    14    >   INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cstristr'
         15        SEND_VAR_EX                                              !0
         16        SEND_VAL_EX                                              'last'
         17        DO_FCALL                                      0  $5      
         18        BOOL_NOT                                         ~6      $5
         19      > JMPZ_EX                                          ~6      ~6, ->26
         20    >   INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cstristr'
         21        SEND_VAR_EX                                              !0
         22        SEND_VAL_EX                                              'first'
         23        DO_FCALL                                      0  $7      
         24        BOOL_NOT                                         ~8      $7
         25        BOOL                                             ~6      ~8
         26    > > JMPZ                                                     ~6, ->38
   18    27    > > JMPZ                                                     !1, ->34
   19    28    >   INIT_STATIC_METHOD_CALL                                  
         29        SEND_VAR_EX                                              !0
         30        SEND_VAR_EX                                              !1
         31        DO_FCALL                                      0  $9      
         32      > RETURN                                                   $9
         33*       JMP                                                      ->38
   21    34    >   INIT_STATIC_METHOD_CALL                                  
         35        SEND_VAR_EX                                              !0
         36        DO_FCALL                                      0  $10     
         37      > RETURN                                                   $10
   27    38    > > JMPZ                                                     !1, ->44
   28    39    >   INIT_STATIC_METHOD_CALL                                  
         40        SEND_VAL_EX                                              'now'
         41        SEND_VAR_EX                                              !1
         42        DO_FCALL                                      0          
         43      > JMP                                                      ->47
   30    44    >   INIT_STATIC_METHOD_CALL                                  
         45        SEND_VAL_EX                                              'now'
         46        DO_FCALL                                      0          
   35    47    >   INIT_METHOD_CALL                                         'setTimestamp'
   36    48        INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cstrtotime'
         49        SEND_VAR_EX                                              !0
         50        INIT_METHOD_CALL                                         'getTimestamp'
         51        DO_FCALL                                      0  $13     
         52        SEND_VAR_NO_REF_EX                                       $13
         53        DO_FCALL                                      0  $14     
         54        SEND_VAR_NO_REF_EX                                       $14
         55        DO_FCALL                                      0          
   39    56        FETCH_THIS                                       ~16     
         57      > RETURN                                                   ~16
   40    58*     > RETURN                                                   null

End of function __construct

Function modify:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 24
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 29
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/7CJod
function name:  modify
number of ops:  45
compiled vars:  !0 = $modify, !1 = $parsedTimestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
   44     1        INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cversion_compare'
          2        FETCH_CONSTANT                                   ~2      'Zend%5CStdlib%5CPHP_VERSION'
          3        SEND_VAL_EX                                              ~2
          4        SEND_VAL_EX                                              '5.3.7'
          5        SEND_VAL_EX                                              '%3E%3D'
          6        DO_FCALL                                      0  $3      
          7      > JMPZ                                                     $3, ->12
   45     8    >   INIT_STATIC_METHOD_CALL                                  'modify'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $4      
         11      > RETURN                                                   $4
   49    12    >   INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cstristr'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAL_EX                                              'last'
         15        DO_FCALL                                      0  $5      
         16        BOOL_NOT                                         ~6      $5
         17      > JMPZ_EX                                          ~6      ~6, ->24
         18    >   INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cstristr'
         19        SEND_VAR_EX                                              !0
         20        SEND_VAL_EX                                              'first'
         21        DO_FCALL                                      0  $7      
         22        BOOL_NOT                                         ~8      $7
         23        BOOL                                             ~6      ~8
         24    > > JMPZ                                                     ~6, ->29
   50    25    >   INIT_STATIC_METHOD_CALL                                  'modify'
         26        SEND_VAR_EX                                              !0
         27        DO_FCALL                                      0  $9      
         28      > RETURN                                                   $9
   55    29    >   INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cstrtotime'
         30        SEND_VAR_EX                                              !0
         31        INIT_METHOD_CALL                                         'getTimestamp'
         32        DO_FCALL                                      0  $10     
         33        SEND_VAR_NO_REF_EX                                       $10
         34        DO_FCALL                                      0  $11     
         35        ASSIGN                                                   !1, $11
   56    36        TYPE_CHECK                                    4          !1
         37      > JMPZ                                                     ~13, ->39
   57    38    > > RETURN                                                   <false>
   59    39    >   INIT_METHOD_CALL                                         'setTimestamp'
         40        SEND_VAR_EX                                              !1
         41        DO_FCALL                                      0          
   61    42        FETCH_THIS                                       ~15     
         43      > RETURN                                                   ~15
   62    44*     > RETURN                                                   null

End of function modify

End of class Zend\Stdlib\DateTime.

Class Zend\Stdlib\classDateTimeTest:
Function setup:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7CJod
function name:  setup
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   68     0  E > > RETURN                                                   null

End of function setup

Function teardown:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/7CJod
function name:  teardown
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   70     0  E >   FETCH_OBJ_R                                      ~0      'revertTz'
          1      > JMPZ                                                     ~0, ->9
   71     2    >   INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cdate_default_timezone_set'
          3        CHECK_FUNC_ARG                                           
          4        FETCH_OBJ_FUNC_ARG                               $1      'revertTz'
          5        SEND_FUNC_ARG                                            $1
          6        DO_FCALL                                      0          
   72     7        ASSIGN_OBJ                                               'revertTz'
          8        OP_DATA                                                  null
   74     9    > > RETURN                                                   null

End of function teardown

Function setdefaulttz:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/7CJod
function name:  setDefaultTz
number of ops:  12
compiled vars:  !0 = $tz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   76     0  E >   RECV                                             !0      
   77     1        FETCH_OBJ_R                                      ~1      'revertTz'
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->11
   78     4    >   INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cdate_default_timezone_get'
          5        DO_FCALL                                      0  $4      
          6        ASSIGN_OBJ                                               'revertTz'
          7        OP_DATA                                                  $4
   79     8        INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cdate_default_timezone_set'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
   81    11    > > RETURN                                                   null

End of function setdefaulttz

Function testbug62896and62561:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7CJod
function name:  testBug62896and62561
number of ops:  124
compiled vars:  !0 = $tz, !1 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   92     0  E >   INIT_METHOD_CALL                                         'setDefaultTz'
          1        SEND_VAL_EX                                              'Europe%2FAmsterdam'
          2        DO_FCALL                                      0          
   94     3        NEW                                              $3      'DateTimeZone'
          4        SEND_VAL_EX                                              'Europe%2FBerlin'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $3
   95     7        NEW                                              $6      'Zend%5CStdlib%5CDateTime'
          8        INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cstrtotime'
          9        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST'
         10        DO_FCALL                                      0  $7      
         11        CONCAT                                           ~8      '%40', $7
         12        SEND_VAL_EX                                              ~8
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !1, $6
   96    15        INIT_METHOD_CALL                                         'assertEquals'
   97    16        SEND_VAL_EX                                              '2012-08-21+22%3A00%3A00+GMT%2B0000+%28offset+0%29'
   98    17        INIT_METHOD_CALL                                         !1, 'format'
         18        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As+T'
         19        DO_FCALL                                      0  $11     
         20        CONCAT                                           ~12     $11, '+%28offset+'
         21        INIT_METHOD_CALL                                         !1, 'getOffset'
         22        DO_FCALL                                      0  $13     
         23        CONCAT                                           ~14     ~12, $13
         24        CONCAT                                           ~15     ~14, '%29'
         25        SEND_VAL_EX                                              ~15
   99    26        SEND_VAL_EX                                              'default+tz+is+Amsterdam%2C+date+from+timestamp%2C+no+timezone%2C+after+%2B0+days'
         27        DO_FCALL                                      0          
  102    28        INIT_METHOD_CALL                                         !1, 'modify'
         29        SEND_VAL_EX                                              '%2B0+days'
         30        DO_FCALL                                      0          
  103    31        INIT_METHOD_CALL                                         'assertEquals'
  104    32        SEND_VAL_EX                                              '2012-08-21+22%3A00%3A00+GMT%2B0000+%28offset+0%29'
  105    33        INIT_METHOD_CALL                                         !1, 'format'
         34        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As+T'
         35        DO_FCALL                                      0  $18     
         36        CONCAT                                           ~19     $18, '+%28offset+'
         37        INIT_METHOD_CALL                                         !1, 'getOffset'
         38        DO_FCALL                                      0  $20     
         39        CONCAT                                           ~21     ~19, $20
         40        CONCAT                                           ~22     ~21, '%29'
         41        SEND_VAL_EX                                              ~22
  106    42        SEND_VAL_EX                                              'default+tz+is+Amsterdam%2C+date+from+timestamp%2C+no+timezone%2C+after+%2B0+days'
         43        DO_FCALL                                      0          
  109    44        NEW                                              $24     'Zend%5CStdlib%5CDateTime'
         45        INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cstrtotime'
         46        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST'
         47        DO_FCALL                                      0  $25     
         48        CONCAT                                           ~26     '%40', $25
         49        SEND_VAL_EX                                              ~26
         50        DO_FCALL                                      0          
         51        ASSIGN                                                   !1, $24
  110    52        INIT_METHOD_CALL                                         !1, 'setTimezone'
         53        SEND_VAR_EX                                              !0
         54        DO_FCALL                                      0          
  111    55        INIT_METHOD_CALL                                         'assertEquals'
  112    56        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST+%28offset+7200%29'
  113    57        INIT_METHOD_CALL                                         !1, 'format'
         58        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As+T'
         59        DO_FCALL                                      0  $30     
         60        CONCAT                                           ~31     $30, '+%28offset+'
         61        INIT_METHOD_CALL                                         !1, 'getOffset'
         62        DO_FCALL                                      0  $32     
         63        CONCAT                                           ~33     ~31, $32
         64        CONCAT                                           ~34     ~33, '%29'
         65        SEND_VAL_EX                                              ~34
  114    66        SEND_VAL_EX                                              'default+tz+is+Amsterdam%2C+date+from+timestamp%2C+with+timezone'
         67        DO_FCALL                                      0          
  117    68        INIT_METHOD_CALL                                         !1, 'modify'
         69        SEND_VAL_EX                                              '%2B0+days'
         70        DO_FCALL                                      0          
  118    71        INIT_METHOD_CALL                                         'assertEquals'
  119    72        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST+%28offset+7200%29'
  120    73        INIT_METHOD_CALL                                         !1, 'format'
         74        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As+T'
         75        DO_FCALL                                      0  $37     
         76        CONCAT                                           ~38     $37, '+%28offset+'
         77        INIT_METHOD_CALL                                         !1, 'getOffset'
         78        DO_FCALL                                      0  $39     
         79        CONCAT                                           ~40     ~38, $39
         80        CONCAT                                           ~41     ~40, '%29'
         81        SEND_VAL_EX                                              ~41
  121    82        SEND_VAL_EX                                              'default+tz+is+Amsterdam%2C+date+from+timestamp%2C+with+timezone%2C+after+%2B0+days'
         83        DO_FCALL                                      0          
  124    84        NEW                                              $43     'Zend%5CStdlib%5CDateTime'
         85        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST'
         86        SEND_VAR_EX                                              !0
         87        DO_FCALL                                      0          
         88        ASSIGN                                                   !1, $43
  125    89        INIT_METHOD_CALL                                         'assertEquals'
  126    90        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST+%28offset+7200%29'
  127    91        INIT_METHOD_CALL                                         !1, 'format'
         92        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As+T'
         93        DO_FCALL                                      0  $46     
         94        CONCAT                                           ~47     $46, '+%28offset+'
         95        INIT_METHOD_CALL                                         !1, 'getOffset'
         96        DO_FCALL                                      0  $48     
         97        CONCAT                                           ~49     ~47, $48
         98        CONCAT                                           ~50     ~49, '%29'
         99        SEND_VAL_EX                                              ~50
  128   100        SEND_VAL_EX                                              'default+tz+is+Amsterdam%2C+date+from+a+string%2C+with+timezone'
        101        DO_FCALL                                      0          
  131   102        INIT_METHOD_CALL                                         !1, 'modify'
        103        SEND_VAL_EX                                              '%2B0+days'
        104        DO_FCALL                                      0          
  132   105        NEW                                              $53     'Zend%5CStdlib%5CDateTime'
        106        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST'
        107        SEND_VAR_EX                                              !0
        108        DO_FCALL                                      0          
        109        ASSIGN                                                   !1, $53
  133   110        INIT_METHOD_CALL                                         'assertEquals'
  134   111        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST+%28offset+7200%29'
  135   112        INIT_METHOD_CALL                                         !1, 'format'
        113        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As+T'
        114        DO_FCALL                                      0  $56     
        115        CONCAT                                           ~57     $56, '+%28offset+'
        116        INIT_METHOD_CALL                                         !1, 'getOffset'
        117        DO_FCALL                                      0  $58     
        118        CONCAT                                           ~59     ~57, $58
        119        CONCAT                                           ~60     ~59, '%29'
        120        SE

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
418.53 ms | 1434 KiB | 26 Q