--TEST-- Testing shp_get_info() --FILE-- <?php error_reporting(E_ALL & ~E_STRICT); if (!extension_loaded('shp')) dl('shp.so'); echo "Opening empty file (/tmp/tmp.shp): "; $shph = shp_open("/tmp/temp.shp", "rb"); var_dump($shph); $res = shp_get_info($shph); var_dump($res); shp_close($shph); echo "Opening empty /tmp/lakes.shp: "; $shph = shp_open("/tmp/lakes.shp", "rb"); var_dump($shph); $res = shp_get_info($shph); var_dump($res); shp_close($shph); echo "\n-END-\n"; ?> --EXPECTF-- Opening empty file (/tmp/tmp.shp): resource(%d) of type (SHP Handle) array(4) { ["pnEntities"]=> int(0) ["pnShapetype"]=> int(1) ["padfMinBound"]=> array(4) { [0]=> float(0) [1]=> float(0) [2]=> float(0) [3]=> float(0) } ["padfMaxBound"]=> array(4) { [0]=> float(0) [1]=> float(0) [2]=> float(0) [3]=> float(0) } } Opening empty /tmp/lakes.shp: resource(%d) of type (SHP Handle) array(4) { ["pnEntities"]=> int(3) ["pnShapetype"]=> int(5) ["padfMinBound"]=> array(4) { [0]=> float(-103.42584%s) [1]=> float(18.09277%s) [2]=> float(-1.6125%s) [3]=> float(0) } ["padfMaxBound"]=> array(4) { [0]=> float(-96.35890%s) [1]=> float(20.339996%s) [2]=> float(0) [3]=> float(0) } } -END-