Created
July 12, 2011 15:54
-
-
Save moustaki/1078262 to your computer and use it in GitHub Desktop.
Weirdness with EasyRdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
var_dump(in_array($graph->resource('http://example.com/2'), $resources));