3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '3-6,8,12,14-20'; var_export( json_decode( '[' . preg_replace_callback( '/(\d+)-(\d+)/', fn($m) => implode(',', range($m[1], $m[2])), $string ) . ']' ) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 3, 1 => 4, 2 => 5, 3 => 6, 4 => 8, 5 => 12, 6 => 14, 7 => 15, 8 => 16, 9 => 17, 10 => 18, 11 => 19, 12 => 20, )

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