<?php
$from = new \DateTime( 'now', new \DateTimezone('Europe/Helsinki') );
$from->modify( 'first day of this month' );
$from->setTime(0,0,0);
$from->setTimezone( new \DateTimeZone( 'UTC' ) );
$from2 = clone $from;
$from2->getTimestamp();
var_dump($from);
var_dump($from2);
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 6
Warning: DateTime::modify(): Failed to parse time string (first day of this month) at position 10 (o): The timezone could not be found in the database in /in/2SKQl on line 3
Fatal error: Call to undefined method DateTime::getTimestamp() in /in/2SKQl on line 9
Process exited with code 255.
Output for 5.2.0 - 5.2.12
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 6
Fatal error: Call to undefined method DateTime::getTimestamp() in /in/2SKQl on line 9
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 6
Fatal error: Class 'DateTime' not found in /in/2SKQl on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 6
Parse error: syntax error, unexpected T_VARIABLE in /in/2SKQl on line 8
Process exited with code 255.
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 6
Parse error: parse error, unexpected T_VARIABLE in /in/2SKQl on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2SKQl on line 6
Parse error: parse error in /in/2SKQl on line 8
Process exited with code 255.