3v4l.org

run code in 300+ PHP versions simultaneously
<?php // you'll have to add more data to cover all the cases $data = [ 0 => [1 => 2, 2 => 2, 3 => 4, 4 => 4, 5 => 6], 1 => [1 => 2, 2 => 4, 3 => 6, 4 => 6, 5 => 12], ]; $compliance = 0; $risk = 2; // retrieve the value $frequency = $data[$compliance][$risk]; printf( 'compliance %d and risk %d = %d months', $compliance, $risk, $frequency ); print PHP_EOL; $compliance = 1; $risk = 5; $frequency = $data[$compliance][$risk]; printf( 'compliance %d and risk %d = %d months', $compliance, $risk, $frequency );
Output for git.master_jit, git.master, rfc.property-hooks
compliance 0 and risk 2 = 2 months compliance 1 and risk 5 = 12 months

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