Skip to content

Instantly share code, notes, and snippets.

@moustaki
Created July 12, 2011 15:54
Show Gist options
  • Save moustaki/1078262 to your computer and use it in GitHub Desktop.
Save moustaki/1078262 to your computer and use it in GitHub Desktop.
Weirdness with EasyRdf
<?php
include_once('/usr/share/php/EasyRdf.php');
$graph = new EasyRdf_Graph();
$graph->add('http://example.com/2', 'rdf:p', 'label');
$graph->addResource('http://example.com/1', 'rdf:p', 'http://example.com/2');
$resources = $graph->resourcesMatching('rdf:p', 'label');
var_dump(in_array('http://example.com/2', $resources));
var_dump(in_array(new EasyRdf_Resource('http://example.com/2'), $resources));
@njh
Copy link

njh commented Jul 12, 2011

var_dump(in_array($graph->resource('http://example.com/2'), $resources));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment