3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Zend\Stdlib; 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 = 77) Position 1 = 7, Position 2 = 50
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 50
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
Found catch point at position: 29
Branch analysis from position: 29
2 jumps found. (Code = 107) Position 1 = 30, Position 2 = -2
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Found catch point at position: 42
Branch analysis from position: 42
2 jumps found. (Code = 107) Position 1 = 43, Position 2 = -2
Branch analysis from position: 43
filename:       /in/vdORS
function name:  (null)
number of ops:  52
compiled vars:  !0 = $testClass, !1 = $method, !2 = $test, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  146     0  E >   NEW                                              $4      'ReflectionClass'
          1        SEND_VAL_EX                                              'Zend%5CStdlib%5CclassDateTimeTest'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
  147     4        INIT_METHOD_CALL                                         !0, 'getMethods'
          5        DO_FCALL                                      0  $7      
          6      > FE_RESET_R                                       $8      $7, ->50
          7    > > FE_FETCH_R                                               $8, !1, ->50
  148     8    >   INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Csubstr'
          9        INIT_METHOD_CALL                                         !1, 'getShortName'
         10        DO_FCALL                                      0  $9      
         11        SEND_VAR_NO_REF_EX                                       $9
         12        SEND_VAL_EX                                              0
         13        SEND_VAL_EX                                              4
         14        DO_FCALL                                      0  $10     
         15        IS_NOT_IDENTICAL                                         $10, 'test'
         16      > JMPZ                                                     ~11, ->18
         17    > > JMP                                                      ->7
  150    18    >   NEW                                              $12     'Zend%5CStdlib%5CclassDateTimeTest'
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !2, $12
  151    21        INIT_METHOD_CALL                                         !2, 'setup'
         22        DO_FCALL                                      0          
  152    23        INIT_METHOD_CALL                                         !1, 'invoke'
         24        SEND_VAR_EX                                              !2
         25        DO_FCALL                                      0          
  153    26        INIT_METHOD_CALL                                         !2, 'teardown'
         27        DO_FCALL                                      0          
         28      > JMP                                                      ->44
  154    29  E > > CATCH                                       last         'Exception'
  155    30    >   INIT_METHOD_CALL                                         !1, 'getShortName'
         31        DO_FCALL                                      0  $18     
         32        CONCAT                                           ~19     'FAIL%3A+', $18
         33        CONCAT                                           ~20     ~19, '%3A+'
         34        INIT_METHOD_CALL                                         !3, 'getMessage'
         35        DO_FCALL                                      0  $21     
         36        CONCAT                                           ~22     ~20, $21
         37        CONCAT                                           ~23     ~22, '%0A'
         38        ECHO                                                     ~23
  157    39        INIT_METHOD_CALL                                         !2, 'teardown'
         40        DO_FCALL                                      0          
         41      > JMP                                                      ->43
  158    42  E > > CATCH                                       last         'Exception'
  159    43    > > JMP                                                      ->7
  161    44    >   INIT_METHOD_CALL                                         !1, 'getShortName'
         45        DO_FCALL                                      0  $25     
         46        CONCAT                                           ~26     'PASS%3A+', $25
         47        CONCAT                                           ~27     ~26, '%0A'
         48        ECHO                                                     ~27
  147    49      > JMP                                                      ->7
         50    >   FE_FREE                                                  $8
  162    51      > 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/vdORS
function name:  __construct
number of ops:  59
compiled vars:  !0 = $time, !1 = $timezone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV_INIT                                        !0      'now'
          1        RECV_INIT                                        !1      null
   10     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
   11     9    >   INIT_STATIC_METHOD_CALL                                  
         10        SEND_VAR_EX                                              !0
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0  $4      
         13      > RETURN                                                   $4
   15    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
   16    27    > > JMPZ                                                     !1, ->34
   17    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
   19    34    >   INIT_STATIC_METHOD_CALL                                  
         35        SEND_VAR_EX                                              !0
         36        DO_FCALL                                      0  $10     
         37      > RETURN                                                   $10
   25    38    > > JMPZ                                                     !1, ->44
   26    39    >   INIT_STATIC_METHOD_CALL                                  
         40        SEND_VAL_EX                                              'now'
         41        SEND_VAR_EX                                              !1
         42        DO_FCALL                                      0          
         43      > JMP                                                      ->47
   28    44    >   INIT_STATIC_METHOD_CALL                                  
         45        SEND_VAL_EX                                              'now'
         46        DO_FCALL                                      0          
   33    47    >   INIT_METHOD_CALL                                         'setTimestamp'
   34    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          
   37    56        FETCH_THIS                                       ~16     
         57      > RETURN                                                   ~16
   38    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/vdORS
function name:  modify
number of ops:  45
compiled vars:  !0 = $modify, !1 = $parsedTimestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   RECV                                             !0      
   42     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
   43     8    >   INIT_STATIC_METHOD_CALL                                  'modify'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $4      
         11      > RETURN                                                   $4
   47    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
   48    25    >   INIT_STATIC_METHOD_CALL                                  'modify'
         26        SEND_VAR_EX                                              !0
         27        DO_FCALL                                      0  $9      
         28      > RETURN                                                   $9
   53    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
   54    36        TYPE_CHECK                                    4          !1
         37      > JMPZ                                                     ~13, ->39
   55    38    > > RETURN                                                   <false>
   57    39    >   INIT_METHOD_CALL                                         'setTimestamp'
         40        SEND_VAR_EX                                              !1
         41        DO_FCALL                                      0          
   59    42        FETCH_THIS                                       ~15     
         43      > RETURN                                                   ~15
   60    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/vdORS
function name:  setup
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   66     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/vdORS
function name:  teardown
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   68     0  E >   FETCH_OBJ_R                                      ~0      'revertTz'
          1      > JMPZ                                                     ~0, ->9
   69     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          
   70     7        ASSIGN_OBJ                                               'revertTz'
          8        OP_DATA                                                  null
   72     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/vdORS
function name:  setDefaultTz
number of ops:  12
compiled vars:  !0 = $tz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   74     0  E >   RECV                                             !0      
   75     1        FETCH_OBJ_R                                      ~1      'revertTz'
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->11
   76     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
   77     8        INIT_NS_FCALL_BY_NAME                                    'Zend%5CStdlib%5Cdate_default_timezone_set'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
   79    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/vdORS
function name:  testBug62896and62561
number of ops:  124
compiled vars:  !0 = $tz, !1 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   90     0  E >   INIT_METHOD_CALL                                         'setDefaultTz'
          1        SEND_VAL_EX                                              'Europe%2FAmsterdam'
          2        DO_FCALL                                      0          
   92     3        NEW                                              $3      'DateTimeZone'
          4        SEND_VAL_EX                                              'Europe%2FBerlin'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $3
   93     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
   94    15        INIT_METHOD_CALL                                         'assertEquals'
   95    16        SEND_VAL_EX                                              '2012-08-21+22%3A00%3A00+GMT%2B0000+%28offset+0%29'
   96    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
   97    26        SEND_VAL_EX                                              'default+tz+is+Amsterdam%2C+date+from+timestamp%2C+no+timezone%2C+after+%2B0+days'
         27        DO_FCALL                                      0          
  100    28        INIT_METHOD_CALL                                         !1, 'modify'
         29        SEND_VAL_EX                                              '%2B0+days'
         30        DO_FCALL                                      0          
  101    31        INIT_METHOD_CALL                                         'assertEquals'
  102    32        SEND_VAL_EX                                              '2012-08-21+22%3A00%3A00+GMT%2B0000+%28offset+0%29'
  103    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
  104    42        SEND_VAL_EX                                              'default+tz+is+Amsterdam%2C+date+from+timestamp%2C+no+timezone%2C+after+%2B0+days'
         43        DO_FCALL                                      0          
  107    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
  108    52        INIT_METHOD_CALL                                         !1, 'setTimezone'
         53        SEND_VAR_EX                                              !0
         54        DO_FCALL                                      0          
  109    55        INIT_METHOD_CALL                                         'assertEquals'
  110    56        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST+%28offset+7200%29'
  111    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
  112    66        SEND_VAL_EX                                              'default+tz+is+Amsterdam%2C+date+from+timestamp%2C+with+timezone'
         67        DO_FCALL                                      0          
  115    68        INIT_METHOD_CALL                                         !1, 'modify'
         69        SEND_VAL_EX                                              '%2B0+days'
         70        DO_FCALL                                      0          
  116    71        INIT_METHOD_CALL                                         'assertEquals'
  117    72        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST+%28offset+7200%29'
  118    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
  119    82        SEND_VAL_EX                                              'default+tz+is+Amsterdam%2C+date+from+timestamp%2C+with+timezone%2C+after+%2B0+days'
         83        DO_FCALL                                      0          
  122    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
  123    89        INIT_METHOD_CALL                                         'assertEquals'
  124    90        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST+%28offset+7200%29'
  125    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
  126   100        SEND_VAL_EX                                              'default+tz+is+Amsterdam%2C+date+from+a+string%2C+with+timezone'
        101        DO_FCALL                                      0          
  129   102        INIT_METHOD_CALL                                         !1, 'modify'
        103        SEND_VAL_EX                                              '%2B0+days'
        104        DO_FCALL                                      0          
  130   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
  131   110        INIT_METHOD_CALL                                         'assertEquals'
  132   111        SEND_VAL_EX                                              '2012-08-22+00%3A00%3A00+CEST+%28offset+7200%29'
  133   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        SEND_VAL_EX                                              ~60
  134   121        SEND_VAL_EX                                              'default+tz+is+Amsterdam%2C+date+from+a+string%2C+with+timezone%2C+after+%2B0+days'
        122        DO_FCALL                                      0          
  136   123      > RETURN                                                   null

End of function testbug62896and62561

Function assertequals:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
Branch a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
275.02 ms | 1428 KiB | 26 Q