--TEST-- MongoDB\BSON\Symbol #001 --FILE-- $test) { $s = fromPHP($test); echo "Test#{$n} ", $json = toJSON($s), "\n"; $testagain = toPHP($s); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } ?> ===DONE=== --EXPECT-- Test#0 { "symbol" : "test" } string(21) "{ "symbol" : "test" }" string(21) "{ "symbol" : "test" }" bool(true) ===DONE===