Skip to content

Instantly share code, notes, and snippets.

@dajobe
Created February 3, 2012 17:50
Show Gist options
  • Save dajobe/1731371 to your computer and use it in GitHub Desktop.
Save dajobe/1731371 to your computer and use it in GitHub Desktop.
literarymachine reported crash
<?php
$rdfString = "<foo> <bar> <baz> .";
$storage = librdf_new_storage(librdf_php_get_world(), "memory", null, null);
$model = librdf_new_model(librdf_php_get_world(), $storage, null);
$parser = librdf_new_parser(librdf_php_get_world(), "ntriples", null, null);
$base_uri = librdf_new_uri(librdf_php_get_world(), "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
librdf_parser_parse_string_into_model($parser, $rdfString, $base_uri, $model);
librdf_free_parser($parser);
librdf_new_uri(librdf_php_get_world(), "http://example/1");
librdf_new_node(librdf_php_get_world());
print "Model is $model\n";
print "Finished without crashing\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment