3v4l.org

run code in 300+ PHP versions simultaneously
<?php require 'vendor/autoload.php'; Dotenv::load(__DIR__); $sendgrid_apikey = getenv('YOUR_SENDGRID_APIKEY'); $sendgrid = new SendGrid($sendgrid_apikey); $url = 'https://api.sendgrid.com/'; $pass = $sendgrid_apikey; $template_id = '<your_template_id>'; $js = array( 'sub' => array(':name' => array('Elmer')), 'filters' => array('templates' => array('settings' => array('enable' => 1, 'template_id' => $template_id))) ); $params = array( 'to' => "test@example.com", 'toname' => "Example User", 'from' => "you@youremail.com", 'fromname' => "Your Name", 'subject' => "PHP Test", 'text' => "I'm text!", 'html' => "<strong>I'm HTML!</strong>", 'x-smtpapi' => json_encode($js), ); $request = $url.'api/mail.send.json'; $session = curl_init($request); curl_setopt($session, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); curl_setopt($session, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $sendgrid_apikey)); curl_setopt ($session, CURLOPT_POST, true); curl_setopt ($session, CURLOPT_POSTFIELDS, $params); curl_setopt($session, CURLOPT_HEADER, false); curl_setopt($session, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($session); curl_close($session); print_r($response);

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.40.0090.00618.86
8.3.30.0110.00418.79
8.3.20.0040.00420.16
8.3.10.0040.00423.51
8.3.00.0000.00817.84
8.2.170.0000.01822.96
8.2.160.0070.00720.38
8.2.150.0080.00024.18
8.2.140.0110.00324.66
8.2.130.0050.00320.95
8.2.120.0040.00426.35
8.2.110.0070.00320.45
8.2.100.0000.01217.91
8.2.90.0050.00319.10
8.2.80.0050.00317.97
8.2.70.0040.00417.75
8.2.60.0040.00418.04
8.2.50.0000.00818.10
8.2.40.0050.00322.18
8.2.30.0000.00821.15
8.2.20.0030.00518.00
8.2.10.0040.00418.09
8.2.00.0000.00818.00
8.1.270.0040.00423.96
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0060.00324.01
8.1.230.0000.01117.71
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0040.00417.35
8.1.180.0050.00318.10
8.1.170.0060.00318.57
8.1.160.0040.00418.93
8.1.150.0040.00420.55
8.1.140.0000.00719.55
8.1.130.0040.00418.93
8.1.120.0040.00417.39
8.1.110.0060.00317.44
8.1.100.0080.00317.27
8.1.90.0030.00517.32
8.1.80.0040.00417.45
8.1.70.0000.00817.49
8.1.60.0040.00417.68
8.1.50.0030.00617.62
8.1.40.0000.00817.46
8.1.30.0040.00417.68
8.1.20.0090.00017.57
8.1.10.0050.00317.70
8.1.00.0000.00817.54
8.0.300.0060.00318.77
8.0.290.0050.00517.00
8.0.280.0030.00318.49
8.0.270.0080.00317.36
8.0.260.0050.00316.99
8.0.250.0030.00317.11
8.0.240.0040.00417.11
8.0.230.0070.00317.03
8.0.220.0030.00316.94
8.0.210.0030.00316.97
8.0.200.0000.00716.98
8.0.190.0000.00917.13
8.0.180.0000.00816.99
8.0.170.0000.00817.07
8.0.160.0040.00416.98
8.0.150.0000.00817.00
8.0.140.0030.00517.00
8.0.130.0030.00313.54
8.0.120.0040.00417.02
8.0.110.0040.00416.89
8.0.100.0040.00416.86
8.0.90.0070.00017.13
8.0.80.0120.01217.07
8.0.70.0050.00317.03
8.0.60.0030.00516.98
8.0.50.0080.00017.03
8.0.30.0150.00317.14
8.0.20.0110.01117.40
8.0.10.0040.00416.96
8.0.00.0170.00317.03
7.4.330.0000.00515.55
7.4.320.0070.00016.62
7.4.300.0000.00716.55
7.4.290.0040.00416.52
7.4.280.0040.00416.54
7.4.270.0030.00316.70
7.4.260.0040.00416.55
7.4.250.0030.00316.41
7.4.240.0000.00716.67
7.4.230.0000.00716.76
7.4.220.0120.00616.57
7.4.210.0110.00416.52
7.4.200.0000.00716.68
7.4.160.0150.00416.53
7.4.150.0060.01317.40
7.4.140.0110.00717.86
7.4.130.0060.01316.48
7.4.120.0120.00616.56
7.4.110.0150.00616.42
7.4.100.0040.01316.56
7.4.90.0130.01316.63
7.4.80.0120.00619.39
7.4.70.0100.00716.71
7.4.60.0100.00716.47
7.4.50.0090.00616.59
7.4.40.0070.01016.43
7.4.30.0130.00316.61
7.4.00.0000.01414.82
7.3.330.0050.00013.14
7.3.320.0060.00013.20
7.3.310.0030.00316.38
7.3.300.0070.00016.32
7.3.290.0030.01116.29
7.3.280.0070.01016.34
7.3.270.0110.00717.40
7.3.260.0130.00416.48
7.3.250.0110.00916.40
7.3.240.0100.01216.43
7.3.230.0050.01316.36
7.3.210.0060.01016.39
7.3.200.0000.01616.42
7.3.190.0190.00316.68
7.3.180.0130.00816.30
7.3.170.0100.00616.44
7.3.160.0130.00316.39
7.2.330.0100.01316.64
7.2.320.0130.00316.43
7.2.310.0090.01316.45
7.2.300.0110.00816.57
7.2.290.0050.01916.66
7.2.60.0120.00016.61
7.2.00.0090.00319.04
7.1.200.0040.01115.77
7.1.100.0060.00617.96
7.1.70.0030.01017.20
7.1.60.0110.01534.73
7.1.50.0160.02034.75
7.1.40.0280.00034.26
7.1.30.0180.00934.33
7.1.20.0210.00734.48
7.1.10.0030.01016.41
7.1.00.0080.01016.51
7.0.200.0030.01416.68
7.0.190.0000.01116.35
7.0.180.0040.01216.12
7.0.170.0040.00815.97
7.0.160.0030.00916.03
7.0.150.0110.00215.97
7.0.140.0000.01816.03
7.0.130.0030.01416.27
7.0.120.0060.01216.40
7.0.110.0080.00815.94
7.0.100.0090.00616.24
7.0.90.0000.01715.93
7.0.80.0060.00616.08
7.0.70.0030.01015.93
7.0.60.0100.00615.89
7.0.50.0090.00616.34
7.0.40.0000.01616.64
7.0.30.0030.01316.49
7.0.20.0040.01216.40
7.0.10.0040.01116.40
7.0.00.0080.00816.53

preferences:
43.33 ms | 400 KiB | 5 Q