3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('APPKEY','XXXXXXXXXXXXXXX'); // Your app key define('PUSHSECRET', 'XXXXXXXXXXXXXXX'); // Your master Secret define('PUSHURL', 'https://go.urbanairship.com/api/push/'); $iosspecific = array(); $iosspecific['badge'] = "+1"; $iosspecific['sound'] = "cat.caf"; $notification = array(); $notification['alert'] = "PHP script test with rich push"; $notification['ios'] = $iosspecific; $platform = array(); array_push($platform, "ios"); array_push($platform, "android"); //comment out if you don't want Android $richpush = array(); $richpush['title'] = "Title of rich push"; $richpush['body'] = "Body of rich push"; $push = array("audience"=>"all", "notification"=>$notification, "device_types"=>$platform, "message"=>$richpush); $json = json_encode($push); echo $json; //show the payload $session = curl_init(PUSHURL); curl_setopt($session, CURLOPT_USERPWD, APPKEY . ':' . PUSHSECRET); curl_setopt($session, CURLOPT_POST, True); curl_setopt($session, CURLOPT_POSTFIELDS, $json); curl_setopt($session, CURLOPT_HEADER, False); curl_setopt($session, CURLOPT_RETURNTRANSFER, True); curl_setopt($session, CURLOPT_HTTPHEADER, array('Content-Type:application/json', 'Accept: application/vnd.urbanairship+json; version=3;')); $content = curl_exec($session); echo $content; //show the response text // Check if any error occured $response = curl_getinfo($session); if($response['http_code'] != 202) { echo "Got negative response from server, http code: ". $response['http_code'] . "\n"; } else { echo "Wow, it worked!\n"; } curl_close($session); ?><?php

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.0030.01518.39
8.3.50.0120.00721.15
8.3.40.0070.00718.96
8.3.30.0070.00720.17
8.3.20.0040.00420.61
8.3.10.0000.00821.17
8.3.00.0040.00423.48
8.2.180.0070.01017.00
8.2.170.0040.01822.96
8.2.160.0070.00720.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00420.95
8.2.110.0090.00019.32
8.2.100.0090.00318.03
8.2.90.0000.00819.17
8.2.80.0080.00018.05
8.2.70.0040.00417.63
8.2.60.0040.00418.05
8.2.50.0050.00318.07
8.2.40.0000.01118.27
8.2.30.0040.00419.45
8.2.20.0030.00617.83
8.2.10.0040.00417.79
8.2.00.0000.00717.87
8.1.280.0070.01025.92
8.1.270.0050.00223.99
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0030.00623.92
8.1.230.0040.00821.10
8.1.220.0040.00418.77
8.1.210.0040.00419.35
8.1.200.0110.00017.35
8.1.190.0000.00817.52
8.1.180.0050.00318.10
8.1.170.0050.00318.78
8.1.160.0040.00418.89
8.1.150.0000.00818.64
8.1.140.0000.00817.45
8.1.130.0020.00517.81
8.1.120.0040.00417.37
8.1.110.0040.00417.46
8.1.100.0040.00417.41
8.1.90.0000.00717.36
8.1.80.0000.00717.48
8.1.70.0030.00317.48
8.1.60.0030.00617.62
8.1.50.0000.00717.47
8.1.40.0060.00317.60
8.1.30.0040.00417.64
8.1.20.0040.00417.78
8.1.10.0000.00717.68
8.1.00.0000.00717.57
8.0.300.0000.00719.93
8.0.290.0040.00417.17
8.0.280.0040.00418.45
8.0.270.0030.00317.23
8.0.260.0030.00516.93
8.0.250.0030.00317.06
8.0.240.0040.00717.14
8.0.230.0000.00716.88
8.0.220.0030.00316.93
8.0.210.0000.00816.92
8.0.200.0030.00317.05
8.0.190.0040.00417.02
8.0.180.0050.00316.93
8.0.170.0040.00417.01
8.0.160.0050.00217.01
8.0.150.0080.00016.87
8.0.140.0030.00316.82
8.0.130.0000.00613.45
8.0.120.0040.00416.93
8.0.110.0000.00716.95
8.0.100.0080.00016.87
8.0.90.0040.00316.79
8.0.80.0120.00316.97
8.0.70.0040.00417.02
8.0.60.0040.00417.02
8.0.50.0040.00416.80
8.0.30.0090.00917.09
8.0.20.0080.01217.40
8.0.10.0000.00717.01
8.0.00.0100.01016.86
7.4.330.0000.00615.00
7.4.320.0040.00416.50
7.4.300.0060.00016.67
7.4.290.0000.00716.59
7.4.280.0000.00716.47
7.4.270.0030.00316.66
7.4.260.0000.00713.34
7.4.250.0040.00416.55
7.4.240.0070.00016.55
7.4.230.0000.00716.69
7.4.220.0130.01316.50
7.4.210.0100.00916.60
7.4.200.0000.00716.67
7.4.190.0000.00716.63
7.4.160.0100.01316.46
7.4.150.0100.01317.40
7.4.140.0070.01017.86
7.4.130.0080.00816.53
7.4.120.0110.00716.67
7.4.110.0030.01316.53
7.4.100.0120.00816.46
7.4.90.0180.00016.66
7.4.80.0100.00719.39
7.4.70.0110.00616.77
7.4.60.0100.00716.77
7.4.50.0000.00816.64
7.4.40.0070.00722.77
7.4.30.0030.01916.48
7.3.330.0060.00013.02
7.3.320.0030.00313.00
7.3.310.0030.00316.27
7.3.300.0080.00016.47
7.3.290.0060.00816.42
7.3.280.0080.00816.47
7.3.270.0140.00417.40
7.3.260.0110.00918.24
7.3.250.0070.01016.59
7.3.240.0160.00616.52
7.3.230.0060.01016.54
7.3.210.0070.01016.51
7.3.200.0070.01119.39
7.3.190.0170.00316.62
7.3.180.0120.00916.34
7.3.170.0030.01216.55
7.3.160.0100.00716.48
7.2.330.0100.01016.36
7.2.320.0030.01416.66
7.2.310.0070.01516.79
7.2.300.0090.00616.36
7.2.290.0100.00616.60
5.6.20.0100.07720.54
5.6.10.0030.07720.37
5.6.00.0030.05020.44
5.5.180.0100.06020.13
5.5.160.0030.06720.23
5.5.150.0070.04020.25
5.5.140.0030.07720.17
5.5.130.0100.04720.13
5.5.120.0000.05320.18
5.5.110.0130.06720.16
5.5.100.0070.05020.11
5.5.90.0000.08720.18
5.5.80.0130.06720.13
5.5.70.0100.03720.07
5.5.60.0030.05020.06
5.5.50.0070.03720.16
5.5.40.0000.04720.16
5.5.30.0030.05020.12
5.5.20.0130.07019.97
5.5.10.0130.07020.03
5.5.00.0070.04720.04
5.4.340.0130.06718.98
5.4.320.0070.04718.95
5.4.310.0100.05318.98
5.4.300.0030.05319.09
5.4.290.0100.07719.20
5.4.280.0100.08018.89
5.4.270.0070.04719.09
5.4.260.0070.08018.96
5.4.250.0070.04318.90
5.4.240.0030.06719.09
5.4.230.0100.04018.94
5.4.220.0070.05318.96
5.4.210.0130.03019.05
5.4.200.0100.07018.78
5.4.190.0200.06719.09
5.4.180.0100.07719.04
5.4.170.0070.07719.22
5.4.160.0170.04719.10
5.4.150.0000.08018.88
5.4.140.0130.06716.24
5.4.130.0130.06716.29
5.4.120.0000.04016.23
5.4.110.0030.08016.23
5.4.100.0030.05316.21
5.4.90.0100.03716.19
5.4.80.0170.06316.31
5.4.70.0100.03016.20
5.4.60.0030.04716.24
5.4.50.0100.06016.21
5.4.40.0100.06716.34
5.4.30.0030.05016.39
5.4.20.0030.06316.23
5.4.10.0300.04016.21
5.4.00.0070.07315.68
5.3.290.0030.08014.70
5.3.280.0030.07714.45
5.3.270.0030.04714.63
5.3.260.0070.07014.62
5.3.250.0030.09014.46
5.3.240.0100.07014.52
5.3.230.0100.07014.59
5.3.220.0100.07714.40
5.3.210.0030.07714.53
5.3.200.0000.04714.57
5.3.190.0030.06314.52
5.3.180.0070.06314.56
5.3.170.0100.03714.57
5.3.160.0070.07014.54
5.3.150.0100.04314.53
5.3.140.0100.07014.50
5.3.130.0070.07314.57
5.3.120.0070.04714.52
5.3.110.0030.06014.47
5.3.100.0230.05314.07
5.3.90.0100.06713.96
5.3.80.0070.07013.98
5.3.70.0070.07014.01
5.3.60.0100.06714.00
5.3.50.0100.07013.97
5.3.40.0130.06313.91
5.3.30.0070.07013.91
5.3.20.0000.04713.67
5.3.10.0070.06313.63
5.3.00.0070.05013.63
5.2.170.0070.05711.00
5.2.160.0100.05011.16
5.2.150.0070.07011.20
5.2.140.0100.04011.15
5.2.130.0100.05310.95
5.2.120.0000.04011.19
5.2.110.0030.05310.95
5.2.100.0000.04010.93
5.2.90.0030.04011.19
5.2.80.0000.05010.90
5.2.70.0030.04310.93
5.2.60.0030.05711.06
5.2.50.0000.03710.87
5.2.40.0000.03011.08
5.2.30.0170.06010.95
5.2.20.0070.05010.97
5.2.10.0030.03710.87
5.2.00.0000.03010.77
5.1.60.0030.02710.00
5.1.50.0000.0579.84
5.1.40.0000.05710.02
5.1.30.0030.05710.21
5.1.20.0030.05710.23
5.1.10.0000.06010.08
5.1.00.0030.05010.13
5.0.50.0000.0308.40
5.0.40.0000.0478.43
5.0.30.0030.0338.23
5.0.20.0000.0408.30
5.0.10.0030.0278.22
5.0.00.0070.0608.24
4.4.90.0000.0177.10
4.4.80.0100.0337.10
4.4.70.0100.0177.10
4.4.60.0030.0277.10
4.4.50.0000.0337.10
4.4.40.0030.0337.10
4.4.30.0000.0337.10
4.4.20.0000.0377.10
4.4.10.0070.0237.10
4.4.00.0000.0277.10
4.3.110.0030.0237.10
4.3.100.0000.0277.10
4.3.90.0030.0237.10
4.3.80.0070.0277.10
4.3.70.0030.0307.10
4.3.60.0000.0337.10
4.3.50.0070.0207.10
4.3.40.0000.0577.10
4.3.30.0000.0237.10
4.3.20.0000.0207.10
4.3.10.0000.0377.10
4.3.00.0030.0337.10

preferences:
41.39 ms | 401 KiB | 5 Q