3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Loginhandler{ public $email; public $password; private $verification; private $db; public function __construct($database) { $this->db = $database; } public function login($email, $password) { $query = $this->db->prepare("SELECT * FROM `leden` WHERE `email` = :email AND `wachtwoord` = :password"); $query->bindValue(":email", $email); $query->bindValue(":password", $password); try{ $query->execute(); $data = $query->rowCount(); if($data == '1'){ return true; }else{ return false; } }catch(PDOException $e){ die($e->getMessage()); } } public function user_exists($email) { $query = $this->db->prepare("SELECT COUNT(`id`) FROM `leden` WHERE `email`= ?"); $query->bindValue(1, $email); try{ $query->execute(); $rows = $query->fetchColumn(); if($rows == 1){ return true; }else{ return false; } } catch (PDOException $e){ die($e->getMessage()); } } } ?>
Output for git.master, git.master_jit, rfc.property-hooks

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.2 ms | 401 KiB | 8 Q