3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serverApiKey = "AIzaSyBFtNb7a_TCtxSqkiWUc5qGKVJ1KJtIa0s"; $reg_id = "fwrBnLTNyCg:APA91bGmHvhFWgXPJcXi7Lh5T1iBZ80u8KaXdhiNmoRTrk0nvCDDm-2dBd6esuCaG4hU33dU1oqU0jYQYvdRFm3alflhyXl7dhGyGb7PaFHbuU3FaSbsYfJagfe6NdLZDRElDU5cZoYc"; define("GOOGLE_API_KEY", "AIzaSyBFtNb7a_TCtxSqkiWUc5qGKVJ1KJtIa0s"); define("GOOGLE_GCM_URL", "https://android.googleapis.com/gcm/send"); function send_gcm_notify($reg_id, $message) { $fields = array( 'registration_ids' => array( $reg_id ), 'data' => array( "title" => "yolo", "message" => $message ), ); $headers = array( 'Authorization: key=' . GOOGLE_API_KEY, 'Content-Type: application/json' ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, GOOGLE_GCM_URL); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields)); $result = curl_exec($ch); if ($result === FALSE) { die('Problem occurred: ' . curl_error($ch)); } curl_close($ch); echo $result; } $msg = "Google Cloud Messaging working well"; send_gcm_notify($reg_id, $msg);

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.60.0040.01816.88
8.3.50.0140.00016.23
8.3.40.0140.00018.84
8.3.30.0040.01118.66
8.3.20.0030.00620.34
8.3.10.0030.00523.70
8.3.00.0060.00319.25
8.2.180.0060.00918.67
8.2.170.0170.00322.96
8.2.160.0090.01220.32
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00519.33
8.2.120.0040.00426.35
8.2.110.0080.00022.12
8.2.100.0040.00817.84
8.2.90.0050.00319.36
8.2.80.0050.00318.04
8.2.70.0030.00617.75
8.2.60.0000.00718.03
8.2.50.0080.00018.10
8.2.40.0050.00320.61
8.2.30.0050.00321.10
8.2.20.0000.00718.08
8.2.10.0040.00418.20
8.2.00.0070.00018.13
8.1.280.0180.00925.92
8.1.270.0070.00022.13
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00623.91
8.1.230.0000.01120.85
8.1.220.0030.00517.78
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0060.00317.22
8.1.180.0030.00518.10
8.1.170.0040.00418.71
8.1.160.0050.00218.99
8.1.150.0040.00418.92
8.1.140.0080.00019.47
8.1.130.0000.00718.83
8.1.120.0030.00417.38
8.1.110.0040.00417.54
8.1.100.0000.00817.53
8.1.90.0000.00717.46
8.1.80.0000.00717.37
8.1.70.0050.00217.50
8.1.60.0060.00317.61
8.1.50.0040.00417.55
8.1.40.0030.00617.53
8.1.30.0000.00817.64
8.1.20.0050.00217.63
8.1.10.0080.00417.51
8.1.00.0040.00417.53
8.0.300.0060.00318.77
8.0.290.0000.00716.88
8.0.280.0000.00718.46
8.0.270.0040.00417.15
8.0.260.0030.00318.53
8.0.250.0040.00416.95
8.0.240.0030.00716.96
8.0.230.0030.00317.02
8.0.220.0040.00416.85
8.0.210.0030.00316.91
8.0.200.0030.00317.07
8.0.190.0050.00317.05
8.0.180.0040.00417.05
8.0.170.0070.00017.00
8.0.160.0030.00316.97
8.0.150.0040.00416.98
8.0.140.0000.00716.87
8.0.130.0060.00013.32
8.0.120.0080.00016.97
8.0.110.0040.00416.88
8.0.100.0000.00716.81
8.0.90.0080.00017.00
8.0.80.0060.00916.91
8.0.70.0020.00516.99
8.0.60.0050.00316.84
8.0.50.0040.00416.89
8.0.30.0070.01117.10
8.0.20.0100.01117.40
8.0.10.0000.00716.90
8.0.00.0120.00616.74
7.4.330.0060.00015.55
7.4.320.0070.00016.66
7.4.300.0030.00316.68
7.4.290.0080.00016.45
7.4.280.0070.00016.53
7.4.270.0000.00716.63
7.4.260.0040.00416.55
7.4.250.0070.00016.60
7.4.240.0040.00416.56
7.4.230.0040.00416.38
7.4.220.0030.01516.45
7.4.210.0030.01216.68
7.4.200.0030.00416.62
7.4.160.0090.00716.47
7.4.150.0060.01617.40
7.4.140.0100.00917.86
7.4.130.0100.00716.51
7.4.120.0070.01516.56
7.4.110.0140.00416.45
7.4.100.0130.00616.61
7.4.90.0110.00816.54
7.4.80.0100.01519.39
7.4.70.0150.00716.44
7.4.60.0060.01016.43
7.4.50.0100.00316.38
7.4.40.0090.00616.47
7.4.30.0080.00816.61
7.4.00.0090.00515.15
7.3.330.0030.00213.42
7.3.320.0030.00313.44
7.3.310.0040.00416.34
7.3.300.0000.00716.32
7.3.290.0080.00616.44
7.3.280.0070.01116.43
7.3.270.0100.00717.40
7.3.260.0110.00616.49
7.3.250.0090.01116.52
7.3.240.0100.00716.53
7.3.230.0180.00016.49
7.3.210.0130.00916.55
7.3.200.0100.01016.58
7.3.190.0050.01516.59
7.3.180.0080.01216.57
7.3.170.0100.00716.37
7.3.160.0060.01216.46
7.3.120.0070.01315.13
7.3.110.0090.00915.11
7.3.100.0040.01114.84
7.3.90.0100.00614.86
7.3.80.0000.01414.87
7.3.70.0040.01214.77
7.3.60.0030.00714.80
7.3.50.0030.01014.97
7.3.40.0090.00614.64
7.3.30.0000.00914.90
7.3.20.0110.00416.62
7.3.10.0020.01016.70
7.3.00.0050.00816.69
7.2.330.0090.00916.82
7.2.320.0030.01316.75
7.2.310.0140.00316.64
7.2.300.0110.01116.83
7.2.290.0060.01016.55
7.2.250.0070.01115.26
7.2.240.0030.01815.25
7.2.230.0030.01215.23
7.2.220.0090.00614.70
7.2.210.0130.00314.94
7.2.200.0060.01315.11
7.2.190.0060.00315.16
7.2.180.0040.00715.02
7.2.170.0030.01315.05
7.2.130.0110.00316.83
7.2.120.0100.00316.93
7.2.110.0030.00816.93
7.2.100.0060.00616.70
7.2.90.0130.00316.96
7.2.80.0000.01516.71
7.2.70.0000.00916.91
7.2.60.0030.01116.88
7.2.50.0100.00316.81
7.2.40.0090.00016.96
7.2.30.0090.00616.91
7.2.20.0080.00417.15
7.2.10.0040.01116.90
7.2.00.0060.01118.35
7.1.330.0030.01016.00
7.1.320.0080.00615.82
7.1.310.0030.01015.77
7.1.300.0100.00315.89
7.1.290.0060.00615.73
7.1.280.0100.00715.94
7.1.270.0040.00715.56
7.1.260.0040.01115.76
7.1.250.0060.00315.75
7.1.200.0090.00315.96
7.1.100.0060.00917.97
7.1.70.0090.00617.19
7.1.60.0350.00435.05
7.1.50.0140.02534.89
7.1.40.0190.00934.45
7.1.30.0210.00734.55
7.1.20.0130.01634.55
7.1.10.0030.01016.53
7.1.00.0100.00316.60
7.0.200.0070.00716.75
7.0.190.0070.00716.88
7.0.180.0050.00916.20
7.0.170.0090.00516.23
7.0.160.0030.00916.31
7.0.150.0050.00816.52
7.0.140.0030.01016.41
7.0.130.0070.00716.58
7.0.120.0040.00816.60
7.0.110.0030.01016.41
7.0.100.0030.00916.42
7.0.90.0040.00816.34
7.0.80.0060.00616.36
7.0.70.0030.00916.43
7.0.60.0040.01616.16
7.0.50.0060.00816.17
7.0.40.0030.01016.48
7.0.30.0100.00316.58
7.0.20.0130.00016.63
7.0.10.0030.00916.44
7.0.00.0070.00716.68

preferences:
46.09 ms | 401 KiB | 5 Q