3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cidr = "192.168.2.1, 23.34.45.56"; $arr = explode(",", filter_var($cidr)); foreach ($arr as $item) { echo "$item <br>"; } echo $arr[0]; echo "\n"; echo $arr[1]; $a = "1.2.3.4/"; $parts = explode("/", $a); echo $parts[0]; echo $parts[1]; if ($parts[1] == "") { echo "True"; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
192.168.2.1 <br> 23.34.45.56 <br>192.168.2.1 23.34.45.561.2.3.4True

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