3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d1 = Datetime::createFromFormat("Y-m-d", "2017-07-03"); $d2 = Datetime::createFromFormat("Y-m-d", "2018-07-03"); $res = $d2->diff($d1); var_dump($res->format('%a')); $d1 = Datetime::createFromFormat("Y-m-d", "2017-07-30"); $tmp = clone $d1; var_dump($tmp->format('N')); $myArray = array( 0 => 'Big', 1 => 'Small', 2 => 'Up', 3 => 'Down' ); var_dump($myArray);
Output for git.master, git.master_jit, rfc.property-hooks
string(3) "365" string(1) "7" array(4) { [0]=> string(3) "Big" [1]=> string(5) "Small" [2]=> string(2) "Up" [3]=> string(4) "Down" }

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:
62.51 ms | 401 KiB | 8 Q