3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$hours=array("1","2","3","4","5","6","7","8","9"); $holiday=array('sunday','saturday'); $start='2016-01-26 04:30:0'; $end='2016-01-31 04:30:00'; $b=date_create($a); $c=date_format($b,'m-d-y H:i:s'); $d=date('H',$c); //echo date($c+'1day'); //echo $e=($d+'1hour'); $diff=date_diff($end,$start); echo $diff->format("%R%a days"); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $a in /in/sQFvl on line 6 Deprecated: date_create(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/sQFvl on line 6 Fatal error: Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, string given in /in/sQFvl:8 Stack trace: #0 /in/sQFvl(8): date('H', '02-01-16 15:42:...') #1 {main} thrown in /in/sQFvl on line 8
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
65.46 ms | 401 KiB | 8 Q