3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php public function DefineAndBindSimilarContacts($m_user_new) { /* * Определение похожих контактов и склейка их * Если есть новый емайл дописывам в страый * Если есть новый сотовый дописываем в страый */ $result = dbQuery($this->db, "SELECT * FROM m_user WHERE (u_phone='$m_user_new[u_phone]' OR length(u_phone)>3) AND (u_email='$m_user_new[u_email]' OR length(u_email)>3) AND u_status = 5 LIMIT 1"); if ($result->num_rows > 0) { $m_user = $result->fetch_assoc(); if (strlen($m_user_new['u_phone']) > 3 && strlen($m_user_new['u_email']) > 3) { //новый есть новый телефон, а старый емайл отличается от нового - заменяем старый емайл if ($m_user_new['u_phone'] == $m_user['u_phone'] && $m_user_new['u_email'] != $m_user['u_email']) { //обновляем емайл у строго пользователя dbQuery($this->db, "UPDATE m_user SET u_email='$m_user_new[u_email]' WHERE u_id = '$m_user[u_id]' LIMIT 1"); } if ($m_user_new['u_email'] == $m_user['u_email'] && $m_user_new['u_phone'] != $m_user['u_phone']) { //обновляем телефон у строго пользователя dbQuery($this->db, "UPDATE m_user SET u_phone='$m_user_new[u_phone]' WHERE u_id = '$m_user[u_id]' LIMIT 1"); } } } }
Output for 5.4.0 - 5.4.32
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /in/UuP73 on line 3
Process exited with code 255.
Output for 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_PUBLIC in /in/UuP73 on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_PUBLIC in /in/UuP73 on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_FUNCTION in /in/UuP73 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_FUNCTION in /in/UuP73 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/UuP73 on line 3
Process exited with code 255.