3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = file_get_contents('php://stdin','r'); $params = explode("\n",$input); //$params = [5,3,60,100,1024,23456]; $probes = array_shift($params); function silnia($n) { return ($n <= 1) ? 1 : gmp_mul($n, silnia($n-1)); } function z($silnia) { $strSilnia = (string)$silnia; $zeroCount = 0; for ($i = strlen($strSilnia)-1; $i >= 0; $i--) { if ($strSilnia[$i] == 0) $zeroCount += 1; else break; } return $zeroCount; } for ($i = 0; $i < $probes; $i++) { echo z(silnia($params[$i])).PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks

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