3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Используется так: function net_match ( $network , $ip ) { $ip_arr = explode ( '/' , $network ); $network_long = ip2long ( $ip_arr [ 0 ]); $x = ip2long ( $ip_arr [ 1 ]); $mask = long2ip ( $x ) == $ip_arr [ 1 ] ? $x : 0xffffffff << ( 32 - $ip_arr [ 1 ]); $ip_long = ip2long ( $ip ); // echo ">".$ip_arr[1]."> ".decbin($mask)."\n"; return ( $ip_long & $mask ) == ( $network_long & $mask ); } echo net_match ( '10.0.0.0/8', '10.0.0.24' );
Output for git.master, git.master_jit, rfc.property-hooks
1

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