src/JsonRpc.php
public function extractId() {
        $regex = '/[\'"]id[\'"] *: *([0-9]*)/';
        $rawData = $this->getRawPostData();
        if (preg_match($regex, $rawData, $m)) {
            return intval($m[1]);
        } else {
            return null;
        }
    }
public function extractId() {
        $regex = '/[\'"]id[\'"] *: *([0-9]*)/';
        $rawData = $this->getRawPostData();
        if (preg_match($regex, $rawData, $m)) {
            return intval($m[1]);
        } else {
            return null;
        }
    }
public function extractId ( ) { $ regex = '/[\'"]id[\'"] *: *([0-9]*)/' ; $ rawData = $ this -> getRawPostData ( ) ; if ( preg_match ( $ regex , $ rawData , $ m ) ) { return intval ( $ m [ 1 ] ) ; } else { return null ; } }
try to extract id from broken json
@return int
try to extract id from broken json