3v4l.org

run code in 500+ PHP versions simultaneously
<?php $foo = [ '50/2021-10-31@2', '93/2021-11-14@2', '300/2022-02-14@2', ]; $bar = '2021-11-14'; $getTransitos = fn($test, $values): ?int => array_reduce( $values, fn($found, $value): ?int => $found ?? ( strpos($value, $test) ? sscanf($value, '%d/')[0] : null ), null ); var_dump($getTransitos($bar, $foo));
Output for rfc.property-hooks, git.master, git.master_jit
int(93)

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:
51 ms | 1388 KiB | 4 Q