PHP-to-Javascript
PHP-to-Javascript copied to clipboard
multiple implementing not working
interface Int1{}
interface Int2{}
class Foo implements Int1,Int2{}
$foo = new Foo();
$foo instanceof Int1;//this is false
This is not possible to do in javascript. So I need convert to like this
function Int1(){}
function Int2(){}
function Foo(){}
var __IMPLEMENTED_INTERFACES__={};
__IMPLEMENTED_INTERFACES__["<md5 from php file path>"+Foo.class]=[Int1,Int2];
var foo = new Foo();
__instanceof(foo,Int1)