3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('DISPLAY_ERRORS', true); define('DISPLAY_EXCEPTIONS', true); set_time_limit(0); ini_set('memory_limit',-1); ini_set('max_execution_time',0); ini_set('ignore_user_abort','On'); ini_set('display_errors', (DISPLAY_ERRORS)?(1):(0)); ini_set('display_startup_errors', (DISPLAY_ERRORS)?(1):(0)); error_reporting((DISPLAY_ERRORS)?(1):(0)); ignore_user_abort (true); date_default_timezone_set('America/Tegucigalpa'); require_once 'SMTP4PHP.php'; //use SMTP4PHP\User; //use SMTP4PHP\eMail; //use SMTP4PHP\SMTP; class enviarEmail{ private $servidor; private $puerto; private $cuenta_correo; private $contrasena; private $nombre; private $remitente; private $emailServer = NULL; private $smtp = NULL; public function __construct($servidor, $puerto, $cuenta_correo, $contrasena, $nombre){ $this->servidor = $servidor; $this->puerto = $puerto; $this->cuenta_correo = $cuenta_correo; $this->contrasena = $contrasena; $this->nombre = $nombre; $this->remitente = $cuenta_correo; $this->servidor_init(); $this->smtp_init(); } private function servidor_init(){ $this->emailServer = new eMail(); } private function smtp_init(){ $this->smtp = new SMTP($this->servidor, $this->puerto, $this->cuenta_correo, $this->contrasena); } public function enviarLink($correo, $Link){ $this->emailServer->from = new User($this->nombre, $this->remitente); $this->emailServer->to = new User($this->nombre, $correo); $this->emailServer->subject = FROM_SUBJECT; $this->emailServer->htmlMessage = 'Se ha generado su formulario PreImpreso. Tiene '. VALIDEZ_URL .' horas a partir de ahora para descarga el documento y solo tiene vigencia para ser descargado ' . REQUEST_PER_LINK . ' veces. Link para descargar -> ' . $Link; try { $this->smtp->send($this->emailServer); /* O $smtp->send($e,$e2);*/ return true; } catch(Exception $e) { return false; } } public function errorLog(){ echo var_dump($this->smtp->SMTPlog); } } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Failed opening required 'SMTP4PHP.php' (include_path='.:') in /in/sDjiU:15 Stack trace: #0 {main} thrown in /in/sDjiU on line 15
Process exited with code 255.

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:
45.72 ms | 401 KiB | 8 Q