3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php public function index() { $m = new Mail(); $m->setTo("udp.tcp@ya.ru"); $m->setFrom("imag@triton.ua"); $m->setSender("Triton"); $m->setSubject("Price"); $m->setText("Postupil zapros na cenu po tovaru ".$this->request->post["link"]." . ".$this->request->post["user_name"].", Num:".$this->request->post["user_phone"].", Mail:".$this->request->post["user_email"]); $m->send(); $this->response->setOutput(json_encode($this->request->post)); }
Output for 5.4.0 - 5.4.20
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /in/tuFel on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_PUBLIC in /in/tuFel on line 2
Process exited with code 255.