PHP simple solution without built-in functions
\n/**\n * Definition for a singly-linked list.\n * class ListNode {\n *     public $val = 0;\n *     public $next = null;\n *     function __construct($val = 0,
```\n/**\n * Definition for a singly-linked list.\n * class ListNode {\n *     public $val = 0;\n *     public $next = null;\n *     function __construct($val = 0, $next = null) {\n *         $this->val = $val;\n *         $this->next = $next;\n *     }\n * }\n */\nclass Solution {\n\n    /**\n     * @param ListNode $head\n     * @return ListNode\n     */\n    function middleNode($head) {\n        $slow=$head;\n        $fast=$head;\n        while($fast&&$fast->next){\n            $slow=$slow->next;\n            $fast = $fast->next->next;\n            \n        }\n        return $slow;\n    }\n}\n```\nPlease upvote if you like the solution and feel free to ask for more information if you need
['PHP']