3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $API_KEY = 'f313362ef4400dc313d57d573996a086a8db17697ebd6b8c0f77dcb178460406'; $PAGE_ID = 'kw9m35yq84vy'; $METRIC_ID = '8p5cf4zshp98'; $BASE_URI = 'https://api.statuspage.io/v1'; $ch = curl_init(sprintf("%s/pages/%s/metrics/%s/data.json", $BASE_URI, $PAGE_ID, $METRIC_ID)); curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Authorization: OAuth " . $API_KEY, "Expect: 100-continue" ) ); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // need at least 1 data point for every 5 minutes // submit random data for the whole day $total_points = (60 / 5 * 24); for($i = 0; $i < $total_points; $i++) { $ts = time() - ($i * 5 * 60); $value = rand(0, 99); $postparams = array( "data[timestamp]" => $ts, "data[value]" => '1' ); curl_setopt($ch, CURLOPT_POSTFIELDS, $postparams); curl_exec($ch); printf("Submitted point %d of %d\n", ($i + 1), $total_points); } ?>
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/OCmPE:7 Stack trace: #0 {main} thrown in /in/OCmPE on line 7
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Submitted point 1 of 288 Submitted point 2 of 288 Submitted point 3 of 288 Submitted point 4 of 288 Submitted point 5 of 288 Submitted point 6 of 288 Submitted point 7 of 288 Submitted point 8 of 288 Submitted point 9 of 288 Submitted point 10 of 288 Submitted point 11 of 288 Submitted point 12 of 288 Submitted point 13 of 288 Submitted point 14 of 288 Submitted point 15 of 288 Submitted point 16 of 288 Submitted point 17 of 288 Submitted point 18 of 288 Submitted point 19 of 288 Submitted point 20 of 288 Submitted point 21 of 288 Submitted point 22 of 288 Submitted point 23 of 288 Submitted point 24 of 288 Submitted point 25 of 288 Submitted point 26 of 288 Submitted point 27 of 288 Submitted point 28 of 288 Submitted point 29 of 288 Submitted point 30 of 288 Submitted point 31 of 288 Submitted point 32 of 288 Submitted point 33 of 288 Submitted point 34 of 288 Submitted point 35 of 288 Submitted point 36 of 288 Submitted point 37 of 288 Submitted point 38 of 288 Submitted point 39 of 288 Submitted point 40 of 288 Submitted point 41 of 288 Submitted point 42 of 288 Submitted point 43 of 288 Submitted point 44 of 288 Submitted point 45 of 288 Submitted point 46 of 288 Submitted point 47 of 288 Submitted point 48 of 288 Submitted point 49 of 288 Submitted point 50 of 288 Submitted point 51 of 288 Submitted point 52 of 288 Submitted point 53 of 288 Submitted point 54 of 288 Submitted point 55 of 288 Submitted point 56 of 288 Submitted point 57 of 288 Submitted point 58 of 288 Submitted point 59 of 288 Submitted point 60 of 288 Submitted point 61 of 288 Submitted point 62 of 288 Submitted point 63 of 288 Submitted point 64 of 288 Submitted point 65 of 288 Submitted point 66 of 288 Submitted point 67 of 288 Submitted point 68 of 288 Submitted point 69 of 288 Submitted point 70 of 288 Submitted point 71 of 288 Submitted point 72 of 288 Submitted point 73 of 288 Submitted point 74 of 288 Submitted point 75 of 288 Submitted point 76 of 288 Submitted point 77 of 288 Submitted point 78 of 288 Submitted point 79 of 288 Submitted point 80 of 288 Submitted point 81 of 288 Submitted point 82 of 288 Submitted point 83 of 288 Submitted point 84 of 288 Submitted point 85 of 288 Submitted point 86 of 288 Submitted point 87 of 288 Submitted point 88 of 288 Submitted point 89 of 288 Submitted point 90 of 288 Submitted point 91 of 288 Submitted point 92 of 288 Submitted point 93 of 288 Submitted point 94 of 288 Submitted point 95 of 288 Submitted point 96 of 288 Submitted point 97 of 288 Submitted point 98 of 288 Submitted point 99 of 288 Submitted point 100 of 288 Submitted point 101 of 288 Submitted point 102 of 288 Submitted point 103 of 288 Submitted point 104 of 288 Submitted point 105 of 288 Submitted point 106 of 288 Submitted point 107 of 288 Submitted point 108 of 288 Submitted point 109 of 288 Submitted point 110 of 288 Submitted point 111 of 288 Submitted point 112 of 288 Submitted point 113 of 288 Submitted point 114 of 288 Submitted point 115 of 288 Submitted point 116 of 288 Submitted point 117 of 288 Submitted point 118 of 288 Submitted point 119 of 288 Submitted point 120 of 288 Submitted point 121 of 288 Submitted point 122 of 288 Submitted point 123 of 288 Submitted point 124 of 288 Submitted point 125 of 288 Submitted point 126 of 288 Submitted point 127 of 288 Submitted point 128 of 288 Submitted point 129 of 288 Submitted point 130 of 288 Submitted point 131 of 288 Submitted point 132 of 288 Submitted point 133 of 288 Submitted point 134 of 288 Submitted point 135 of 288 Submitted point 136 of 288 Submitted point 137 of 288 Submitted point 138 of 288 Submitted point 139 of 288 Submitted point 140 of 288 Submitted point 141 of 288 Submitted point 142 of 288 Submitted point 143 of 288 Submitted point 144 of 288 Submitted point 145 of 288 Submitted point 146 of 288 Submitted point 147 of 288 Submitted point 148 of 288 Submitted point 149 of 288 Submitted point 150 of 288 Submitted point 151 of 288 Submitted point 152 of 288 Submitted point 153 of 288 Submitted point 154 of 288 Submitted point 155 of 288 Submitted point 156 of 288 Submitted point 157 of 288 Submitted point 158 of 288 Submitted point 159 of 288 Submitted point 160 of 288 Submitted point 161 of 288 Submitted point 162 of 288 Submitted point 163 of 288 Submitted point 164 of 288 Submitted point 165 of 288 Submitted point 166 of 288 Submitted point 167 of 288 Submitted point 168 of 288 Submitted point 169 of 288 Submitted point 170 of 288 Submitted point 171 of 288 Submitted point 172 of 288 Submitted point 173 of 288 Submitted point 174 of 288 Submitted point 175 of 288 Submitted point 176 of 288 Submitted point 177 of 288 Submitted point 178 of 288 Submitted point 179 of 288 Submitted point 180 of 288 Submitted point 181 of 288 Submitted point 182 of 288 Submitted point 183 of 288 Submitted point 184 of 288 Submitted point 185 of 288 Submitted point 186 of 288 Submitted point 187 of 288 Submitted point 188 of 288 Submitted point 189 of 288 Submitted point 190 of 288 Submitted point 191 of 288 Submitted point 192 of 288 Submitted point 193 of 288 Submitted point 194 of 288 Submitted point 195 of 288 Submitted point 196 of 288 Submitted point 197 of 288 Submitted point 198 of 288 Submitted point 199 of 288 Submitted point 200 of 288 Submitted point 201 of 288 Submitted point 202 of 288 Submitted point 203 of 288 Submitted point 204 of 288 Submitted point 205 of 288 Submitted point 206 of 288 Submitted point 207 of 288 Submitted point 208 of 288 Submitted point 209 of 288 Submitted point 210 of 288 Submitted point 211 of 288 Submitted point 212 of 288 Submitted point 213 of 288 Submitted point 214 of 288 Submitted point 215 of 288 Submitted point 216 of 288 Submitted point 217 of 288 Submitted point 218 of 288 Submitted point 219 of 288 Submitted point 220 of 288 Submitted point 221 of 288 Submitted point 222 of 288 Submitted point 223 of 288 Submitted point 224 of 288 Submitted point 225 of 288 Submitted point 226 of 288 Submitted point 227 of 288 Submitted point 228 of 288 Submitted point 229 of 288 Submitted point 230 of 288 Submitted point 231 of 288 Submitted point 232 of 288 Submitted point 233 of 288 Submitted point 234 of 288 Submitted point 235 of 288 Submitted point 236 of 288 Submitted point 237 of 288 Submitted point 238 of 288 Submitted point 239 of 288 Submitted point 240 of 288 Submitted point 241 of 288 Submitted point 242 of 288 Submitted point 243 of 288 Submitted point 244 of 288 Submitted point 245 of 288 Submitted point 246 of 288 Submitted point 247 of 288 Submitted point 248 of 288 Submitted point 249 of 288 Submitted point 250 of 288 Submitted point 251 of 288 Submitted point 252 of 288 Submitted point 253 of 288 Submitted point 254 of 288 Submitted point 255 of 288 Submitted point 256 of 288 Submitted point 257 of 288 Submitted point 258 of 288 Submitted point 259 of 288 Submitted point 260 of 288 Submitted point 261 of 288 Submitted point 262 of 288 Submitted point 263 of 288 Submitted point 264 of 288 Submitted point 265 of 288 Submitted point 266 of 288 Submitted point 267 of 288 Submitted point 268 of 288 Submitted point 269 of 288 Submitted point 270 of 288 Submitted point 271 of 288 Submitted point 272 of 288 Submitted point 273 of 288 Submitted point 274 of 288 Submitted point 275 of 288 Submitted point 276 of 288 Submitted point 277 of 288 Submitted point 278 of 288 Submitted point 279 of 288 Submitted point 280 of 288 Submitted point 281 of 288 Submitted point 282 of 288 Submitted point 283 of 288 Submitted point 284 of 288 Submitted point 285 of 288 Submitted point 286 of 288 Submitted point 287 of 288 Submitted point 288 of 288
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function curl_init() in /in/OCmPE on line 7
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: curl_init() in /in/OCmPE on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: curl_init() in /in/OCmPE on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: curl_init() in /in/OCmPE on line 7