train( [[1, 0], [0, 1], [1, 1], [0, 0]], [[1], [1], [0], [0]], $desiredError = 0.2, 30000 ); $this->assertEquals(0, $network->setInput([1, 1])->getOutput()[0], '', $desiredError); $this->assertEquals(0, $network->setInput([0, 0])->getOutput()[0], '', $desiredError); $this->assertEquals(1, $network->setInput([1, 0])->getOutput()[0], '', $desiredError); $this->assertEquals(1, $network->setInput([0, 1])->getOutput()[0], '', $desiredError); } }