3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "3.11"; $b = "2.9"; $c = "3.10"; $d = "1.11"; $arr1 = explode(".", $a); $arr2 = explode(".", $b); $arr3 = explode(".", $c); $arr4 = explode(".", $d); $y = $arr1[0] + $arr2[0] + $arr3[0] + $arr4[0]; // calculate years If($arr1[1] + $arr2[1] + $arr3[1] + $arr4[1] >=12) $y += floor(($arr1[1] + $arr2[1] + $arr3[1] + $arr4[1])/12); // add one if months is more than 11 $m = ($arr1[1] + $arr2[1] + $arr3[1] + $arr4[1])%12; // modulo calculate months Echo $y . " " . $m;
Output for git.master, git.master_jit, rfc.property-hooks
12 5

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:
117.24 ms | 405 KiB | 5 Q