- json_decode: documentation ( source)
- preg_match: documentation ( source)
<?php
$a='1.1.1';
if(preg_match("/^([0-9]+\.?[0-9]+)+$/",$a)){
$b=json_decode($a);
# echo "DEBUG";
if($var = $b === NULL){
($var===true)?$v3=1:NULL;
}
}
echo $var;
?>