3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = new \DateTime(); $c = clone $d; $e = clone($d); echo $d->format('c'); echo "\n"; echo $c->modify('+1 day')->format('c'); echo "\n"; echo $e->modify('+1 day')->format('c'); echo "\n"; echo clone($d)->modify('+1 day')->format('c');
based on i3STo
Output for 7.0.20 - 7.2.0
2016-01-11T13:39:25+01:00 2016-01-12T13:39:25+01:00 2016-01-12T13:39:25+01:00 Fatal error: Uncaught Error: __clone method called on non-object in /in/AlUso:11 Stack trace: #0 {main} thrown in /in/AlUso on line 11
Process exited with code 255.
Output for 7.0.6
2016-05-21T13:37:11+02:00 2016-05-22T13:37:11+02:00 2016-05-22T13:37:11+02:00 Fatal error: Uncaught Error: __clone method called on non-object in /in/AlUso:11 Stack trace: #0 {main} thrown in /in/AlUso on line 11
Process exited with code 255.
Output for 7.0.5
2016-04-03T09:36:47+02:00 2016-04-04T09:36:47+02:00 2016-04-04T09:36:47+02:00 Fatal error: Uncaught Error: __clone method called on non-object in /in/AlUso:11 Stack trace: #0 {main} thrown in /in/AlUso on line 11
Process exited with code 255.
Output for 7.0.4
2016-03-10T21:43:23+01:00 2016-03-11T21:43:23+01:00 2016-03-11T21:43:23+01:00 Fatal error: Uncaught Error: __clone method called on non-object in /in/AlUso:11 Stack trace: #0 {main} thrown in /in/AlUso on line 11
Process exited with code 255.
Output for 7.0.3
2016-03-18T23:09:36+01:00 2016-03-19T23:09:36+01:00 2016-03-19T23:09:36+01:00 Fatal error: Uncaught Error: __clone method called on non-object in /in/AlUso:11 Stack trace: #0 {main} thrown in /in/AlUso on line 11
Process exited with code 255.
Output for 7.0.2
2016-03-23T05:22:53+01:00 2016-03-24T05:22:53+01:00 2016-03-24T05:22:53+01:00 Fatal error: Uncaught Error: __clone method called on non-object in /in/AlUso:11 Stack trace: #0 {main} thrown in /in/AlUso on line 11
Process exited with code 255.
Output for 7.0.1
2016-03-24T08:28:13+01:00 2016-03-25T08:28:13+01:00 2016-03-25T08:28:13+01:00 Fatal error: Uncaught Error: __clone method called on non-object in /in/AlUso:11 Stack trace: #0 {main} thrown in /in/AlUso on line 11
Process exited with code 255.
Output for 7.0.0
2016-03-27T10:21:26+02:00 2016-03-28T10:21:26+02:00 2016-03-28T10:21:26+02:00 Fatal error: Uncaught Error: __clone method called on non-object in /in/AlUso:11 Stack trace: #0 {main} thrown in /in/AlUso on line 11
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ',' or ';' in /in/AlUso on line 11
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/AlUso on line 11
Process exited with code 255.