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); } } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.70.0070.01316.58
8.3.60.0180.00318.43
8.3.50.0110.00822.84
8.3.40.0040.01118.87
8.3.30.0100.00319.27
8.3.20.0080.00020.21
8.3.10.0040.00423.78
8.3.00.0080.00019.51
8.2.180.0120.00316.63
8.2.170.0150.00022.96
8.2.160.0040.01120.52
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00021.09
8.2.110.0060.00322.00
8.2.100.0060.00619.37
8.2.90.0050.00518.87
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0040.00417.80
8.2.50.0080.00018.07
8.2.40.0030.00519.91
8.2.30.0040.00417.98
8.2.20.0080.00017.75
8.2.10.0070.00018.21
8.2.00.0030.00517.69
8.1.280.0140.00025.92
8.1.270.0040.00420.66
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0090.00024.02
8.1.230.0070.00419.10
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0060.00617.35
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0000.00818.70
8.1.160.0070.00021.93
8.1.150.0070.00018.87
8.1.140.0040.00417.49
8.1.130.0070.00017.85
8.1.120.0030.00517.54
8.1.110.0040.00417.42
8.1.100.0000.01017.50
8.1.90.0040.00417.51
8.1.80.0000.00717.55
8.1.70.0070.00017.36
8.1.60.0000.00817.56
8.1.50.0000.00917.56
8.1.40.0000.00817.44
8.1.30.0040.00417.68
8.1.20.0040.00417.55
8.1.10.0000.00817.61
8.1.00.0000.00717.44
8.0.300.0080.00018.77
8.0.290.0000.00717.00
8.0.280.0080.00018.47
8.0.270.0030.00317.27
8.0.260.0000.00717.36
8.0.250.0030.00317.12
8.0.240.0040.00417.13
8.0.230.0030.00617.01
8.0.220.0000.00717.04
8.0.210.0000.00716.95
8.0.200.0030.00317.13
8.0.190.0070.00016.99
8.0.180.0000.00716.94
8.0.170.0000.00817.07
8.0.160.0040.00417.05
8.0.150.0060.00317.06
8.0.140.0000.00816.95
8.0.130.0000.00513.50
8.0.120.0030.00516.90
8.0.110.0050.00217.00
8.0.100.0030.00516.98
8.0.90.0040.00417.07
8.0.80.0030.01717.09
8.0.70.0040.00416.98
8.0.60.0000.00717.09
8.0.50.0000.00717.10
8.0.30.0160.00717.23
8.0.20.0090.01117.40
8.0.10.0030.00717.15
8.0.00.0110.00816.68
7.4.330.0000.00515.00
7.4.320.0000.00616.54
7.4.300.0060.00016.55
7.4.290.0070.00016.61
7.4.280.0000.00816.39
7.4.270.0060.00316.55
7.4.260.0030.00316.55
7.4.250.0080.00016.52
7.4.240.0040.00416.48
7.4.230.0050.00316.68
7.4.220.0060.01216.53
7.4.210.0110.00416.68
7.4.200.0000.00816.72
7.4.160.0050.01416.49
7.4.150.0120.00617.40
7.4.140.0090.00817.86
7.4.130.0090.01316.61
7.4.120.0110.01116.54
7.4.110.0070.01016.71
7.4.100.0140.00416.39
7.4.90.0150.00316.41
7.4.80.0130.01019.39
7.4.70.0060.01016.63
7.4.60.0030.01316.58
7.4.50.0000.00816.48
7.4.40.0130.00316.41
7.4.30.0030.01316.60
7.4.00.0000.01614.79
7.3.330.0040.00313.31
7.3.320.0030.00313.25
7.3.310.0030.00316.36
7.3.300.0070.00016.23
7.3.290.0100.00616.39
7.3.280.0090.01016.33
7.3.270.0170.00317.40
7.3.260.0120.00816.31
7.3.240.0100.00716.52
7.3.230.0040.01516.39
7.3.210.0140.00316.56
7.3.200.0180.00019.39
7.3.190.0030.01516.41
7.3.180.0040.01216.46
7.3.170.0070.00816.44
7.3.160.0030.01316.44
7.2.330.0120.00616.36
7.2.320.0140.00716.44
7.2.310.0090.01416.69
7.2.300.0120.00416.65
7.2.290.0100.01316.36
7.2.00.0100.00319.25
7.1.100.0030.00817.90
7.1.70.0000.01017.07
7.1.60.0100.00017.09
7.1.50.0110.01416.90
7.1.00.0070.07322.36
7.0.200.0060.00916.76
7.0.140.0100.06722.13
7.0.60.0100.08020.03
7.0.50.0030.08317.92
7.0.40.0130.07320.13
7.0.30.0230.04320.29
7.0.20.0270.05020.11
7.0.10.0070.09020.07
7.0.00.0030.04320.15
5.6.280.0030.07721.09
5.6.210.0100.04720.63
5.6.200.0030.08718.20
5.6.190.0100.08020.52
5.6.180.0330.07720.63
5.6.170.0230.08020.56
5.6.160.0070.04020.56
5.6.150.0100.03318.18
5.6.140.0030.04018.23
5.6.130.0200.07018.22
5.6.120.0030.08021.01
5.6.110.0070.04020.99
5.6.100.0130.08021.13
5.6.90.0000.04721.00
5.6.80.0070.08320.55
5.6.70.0130.07020.39
5.5.350.0170.07720.46
5.5.340.0130.07717.99
5.5.330.0170.06720.19
5.5.320.0070.04020.28
5.5.310.0230.08020.20
5.5.300.0000.05018.05
5.5.290.0000.05318.07
5.5.280.0030.04320.79
5.5.270.0100.05020.90
5.5.260.0100.08720.78
5.5.250.0030.04320.57
5.5.240.0030.05020.38
5.4.450.0170.06019.32
5.4.440.0470.08319.56
5.4.430.0030.06319.43
5.4.420.0130.05319.37
5.4.410.0130.07718.82
5.4.400.0070.05718.77
5.4.390.0130.05018.79
5.4.380.0070.06018.81
5.4.370.0070.04318.76
5.4.360.0000.04718.60
5.4.350.0090.03612.05
5.4.340.0050.05012.05
5.4.320.0090.03712.53
5.4.310.0070.03712.53
5.4.300.0050.04312.53
5.4.290.0090.04812.53
5.4.280.0080.04012.43
5.4.270.0060.03712.42
5.4.260.0030.04012.42
5.4.250.0060.03812.42
5.4.240.0050.03712.42
5.4.230.0070.04012.41
5.4.220.0070.03512.41
5.4.210.0040.03712.42
5.4.200.0080.03512.42
5.4.190.0100.03312.41
5.4.180.0010.04112.41
5.4.170.0030.03912.42
5.4.160.0040.03712.42
5.4.150.0070.03412.41
5.4.140.0050.05312.10
5.4.130.0040.03812.09
5.4.120.0050.04412.05
5.4.110.0050.03512.04
5.4.100.0020.03812.04
5.4.90.0090.03412.04
5.4.80.0050.03912.04
5.4.70.0050.04012.04
5.4.60.0050.03612.04
5.4.50.0050.04212.04
5.4.40.0060.03312.02
5.4.30.0050.03512.02
5.4.20.0040.03512.02
5.4.10.0070.03312.02
5.4.00.0040.03711.52
5.3.290.0070.03812.80
5.3.280.0060.03712.71
5.3.270.0060.03812.73
5.3.260.0030.04112.72
5.3.250.0070.03612.72
5.3.240.0040.03912.72
5.3.230.0060.03712.71
5.3.220.0040.03912.68
5.3.210.0040.04112.68
5.3.200.0060.03612.68
5.3.190.0030.04012.68
5.3.180.0050.04212.68
5.3.170.0050.04212.68
5.3.160.0060.03712.68
5.3.150.0030.04512.68
5.3.140.0070.04312.67
5.3.130.0070.03712.66
5.3.120.0060.03812.66
5.3.110.0050.04012.66
5.3.100.0050.04412.15
5.3.90.0050.03712.13
5.3.80.0050.03712.13
5.3.70.0060.03612.12
5.3.60.0050.03612.11
5.3.50.0070.06012.05
5.3.40.0110.03712.05
5.3.30.0080.03812.01
5.3.20.0080.04911.79
5.3.10.0070.03911.76
5.3.00.0030.03811.75
5.2.170.0020.0349.25
5.2.160.0050.0279.25
5.2.150.0060.0369.25
5.2.140.0060.0359.25
5.2.130.0060.0389.21
5.2.120.0070.0289.21
5.2.110.0050.0289.21
5.2.100.0100.0319.20
5.2.90.0040.0399.21
5.2.80.0030.0319.20
5.2.70.0040.0309.20
5.2.60.0040.0309.16
5.2.50.0030.0309.13
5.2.40.0070.0259.11
5.2.30.0050.0289.08
5.2.20.0050.0459.08
5.2.10.0030.0308.98
5.2.00.0040.0338.85
5.1.60.0070.0218.13
5.1.50.0030.0268.13
5.1.40.0080.0248.11
5.1.30.0050.0258.45
5.1.20.0060.0298.48
5.1.10.0040.0368.21
5.1.00.0070.0238.21
5.0.50.0060.0206.66
5.0.40.0030.0236.53
5.0.30.0050.0296.35
5.0.20.0040.0276.31
5.0.10.0060.0186.28
5.0.00.0050.0306.27
4.4.90.0000.0174.78
4.4.80.0020.0244.75
4.4.70.0010.0174.75
4.4.60.0010.0184.76
4.4.50.0020.0224.77
4.4.40.0050.0264.71
4.4.30.0030.0144.76
4.4.20.0030.0154.84
4.4.10.0050.0174.84
4.4.00.0020.0264.76
4.3.110.0020.0164.67
4.3.100.0030.0144.66
4.3.90.0030.0144.63
4.3.80.0050.0304.58
4.3.70.0050.0144.63
4.3.60.0040.0144.63
4.3.50.0030.0154.63
4.3.40.0030.0244.54
4.3.30.0040.0143.30
4.3.20.0010.0173.29
4.3.10.0010.0163.23
4.3.00.0030.0236.87

preferences:
46.67 ms | 401 KiB | 5 Q