3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php eval(base64_decode('c2V0X3RpbWVfbGltaXQoMCk7DQoNCmNsYXNzIEluc3RhZ3JhbSB7DQogICAgDQogICAgcHVibGljICR1c2VyOw0KICAgIHByaXZhdGUgJHNpZ25hdHVyZUtleTsNCiAgICBwdWJsaWMgJGlzX2xvZ2dlZCA9IGZhbHNlOw0KICAgIHB1YmxpYyBzdGF0aWMgJGFwaVVSTCAgICA9ICcvL2kuaW5zdGFncmFtLmNvbS9hcGkvdjEvJzsNCiAgICBwdWJsaWMgc3RhdGljICR1c2VyQWdlbnQgPSAnSW5zdGFncmFtIDYuOS4xIEFuZHJvaWQgKDE1LzQuMC40OyAxNjBkcGk7IDMyMHg0ODA7IFNvbnk7IE1pbmlQcm87IG1hbmdvOyBzZW1jOyBlbl9VcyknOw0KICAgIHB1YmxpYyBzdGF0aWMgJGtleV92ZXIgICA9IDQ7DQogICAgDQogICAgDQogICAgcHVibGljIGZ1bmN0aW9uIF9fY29uc3RydWN0KCRsb2dpbiwgJHBhc3N3b3JkLCAka2V5KSB7DQogICAgICAgICR0aGlzLT51c2VyID0gWyd1c2VybmFtZSc9PiRsb2dpbiwgJ3Bhc3N3b3JkJz0+JHBhc3N3b3JkXTsNCiAgICAgICAgJHRoaXMtPnNpZ25hdHVyZUtleSA9ICRrZXk7DQogICAgICAgICR0aGlzLT5HVUlEID0gJHRoaXMtPkdlbmVyYXRlR3VpZCgpOw0KICAgICAgICAkdGhpcy0+Y3VybCA9IG5ldyBjVXJsKCR0aGlzLT51c2VyWyd1c2VybmFtZSddLCBzZWxmOjokdXNlckFnZW50KTsNCiAgICAgICAgJHRoaXMtPkF1dGgoKTsNCiAgICAgICAgcmV0dXJuIHRydWU7DQogICAgfQ0KICAgIA0KICAgIHByaXZhdGUgZnVuY3Rpb24gQXV0aCgpIHsNCiAgICAgICAgJHRoaXMtPmluTG9nKCJBdXRoIik7DQogICAgICAgICRsb2dpbiA9ICR0aGlzLT5tY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HVzZXJuYW1lKTsNCiAgICAgICAgJHJlcSA9ICR0aGlzLT5tYWtlQXBpQ2FsbCgndXNlcnMvc2VhcmNoLz9xdWVyeT0nLiR1c2VybmFtZSlbJ3VzZXJzJ11bMF07DQogICAgICAgIGlmKCFpc3NldCgkcmVxWydwayddKSkgew0KICAgICAgICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbigiVXNlciBub3IgZm91bmQiLCAxKTsNCiAgICAgICAgICAgIHJldHVybiBmYWxzZTsNCiAgICAgICAgfQ0KICAgICAgICByZXR1cm4gJHJlcTsNCiAgICB9DQoNCiAgICBwdWJsaWMgZnVuY3Rpb24gZ2V0TWVkaWEoJGlkLCAkY291bnQpIHsNCiAgICAgICAgJHRoaXMtPmluTG9nKCJnZXRNZWRpYSAiLiRpZCk7DQogICAgICAgIA0KICAgICAgICAkbGlzdCA9IFtdOw0KDQogICAgICAgIHdoaWxlKGNvdW50KCRsaXN0KSA8ICRjb3VudCkgew0KICAgICAgICAgICAgJHJlcSA9ICR0aGlzLT5tYWtlQXBpQ2FsbCgnZmVlZC91c2VyLycuJGlkLicvP21heF9pZD0nLiRtYXhfaWQpOw0KICAgICAgICAgICAgDQogICAgICAgICAgICBpZihlbmQoJHJlcVsnaXRlbXMnXSlbJ2lkJ10gIT0gJG1heF9pZCkgew0KICAgICAgICAgICAgICAgICRtYXhfaWQgPSBlbmQoJHJlcVsnaXRlbXMnXSlbJ2lkJ107DQogICAgICAgICAgICB9IGVsc2UgYnJlYWs7DQogICAgICAgICAgICANCiAgICAgICAgICAgICRsaXN0ID0gYXJyYXlfbWVyZ2UoJGxpc3QsICRyZXFbJ2l0ZW1zJ10pOyANCg0KICAgICAgICB9DQogICAgICAgIHJldHVybiBhcnJheV9zbGljZSgkbGlzdCwgMCwgJGNvdW50KTsNCiAgICB9DQoNCiAgICBwdWJsaWMgZnVuY3Rpb24gRm9sbG93KCR1aWQsICRkZXN0cm95ID0gZmFsc2UpIHsNCiAgICAgICAgJHJlcXVl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2xsb3coKSB7DQogICAgICAgICR0aGlzLT5pbkxvZygiZmFzdEZvbGxvdyIpOw0KICAgICAgICAkcXVldWUgPSBbXTsNCiAgICAgICAgJHVzZXJzID0gJHRoaXMtPnVzZXJzV2l0aFN0YXR1cygkdGhpcy0+bGlzdCwgIm5vdGZvbGxvd2VkIik7DQogICAgICAgIGZvcmVhY2ggKCR1c2VycyBhcyAkdXNlcikgew0KICAgICAgICAgICAgaWYoY291bnQoJHF1ZXVlKSA+PSAyNSkgew0KICAgICAgICAgICAgICAgICR0aGlzLT5wYXJlbnQtPm1ha2VBcGlDYWxsKCdmcmllbmRzaGlwcy9jcmVhdGVfbWFueS9hc3luYy8nLCBbInVzZXJfaWRzIj0+aW1wbG9kZSgnLCcsICRxdWV1ZSldKTsNCiAgICAgICAgICAgICAgICBzbGVlcCg1KTsNCiAgICAgICAgICAgICAgICAkcXVldWUgPSBbXTsNCiAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICAgJHF1ZXVlW10gPSAkdXNlclsncGsnXTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KICAgICAgICBpZihjb3VudCgkcXVldWUpKSANCiAgICAgICAgICAgICR0aGlzLT5wYXJlbnQtPm1ha2VBcGlDYWxsKCdmcmllbmRzaGlwcy9jcmVhdGVfbWFueS9hc3luYy8nLCBbInVzZXJfaWRzIj0+aW1wbG9kZSgnLCcsICRxdWV1ZSldKTsNCiAgICB9DQoNCiAgICBwdWJsaWMgZnVuY3Rpb24gdXNlcnNXaXRoU3RhdHVzKCR1c2VycywgJHN0YXR1cykgew0KICAgICAgICAkdGhpcy0+aW5Mb2coInVzZXJzV2l0aFN0YXR1cyAkc3RhdHVzIik7DQoNCiAgICAgICAgLyoqDQogICAgICAgICogICAgcmV0dXJuIG5vdD9mb2xsb3dlZCB1c2VycyBhcnJheQ0KICAgICAgICAqICAgDQogICAgICAgICovDQogICAgICAgICR1c2VyaWRzID0gW107DQoNCiAgICAgICAgJHN0YXR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5XSk7DQogICAgICAgICAgICAgICAgfSBlbHNlaWYoJHN0YXR1cyA9PSAiZm9sbG93ZWQiICYmICgoJGN1cnJlbnRTdGF0dXNbJ2ZvbGxvd2luZyddICE9IHRydWUgJiYgJGN1cnJlbnRTdGF0dXNbJ291dGdvaW5nX3JlcXVlc3QnXSA9PSBmYWxzZSkgfHwgKCRjdXJyZW50U3RhdHVzWydmb2xsb3dpbmcnXSA9PSBmYWxzZSAmJiAkY3VycmVudFN0YXR1c1snb3V0Z29pbmdfcmVxdWVzdCddICE9IHRydWUpKSkgew0KICAgICAgICAgICAgICAgICAgICB1bnNldCgkdXNlcmlkc1ska2V5XSk7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQoNCg0KICAgICAgICBmb3JlYWNoICgkdXNlcnMgYXMgJGtleSA9PiAkdXNlcikgew0KICAgICAgICAgICAgaWYoIWluX2FycmF5KCR1c2VyWydwayddLCAkdXNlcmlkcykpIHsNCiAgICAgICAgICAgICAgICB1bnNldCgkdXNlcnNbJGtleV0pOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQoNCg0KICAgICAgICByZXR1cm4gJHVzZXJzOw0KDQogICAgfQ0KDQogICAgcHVibGljIGZ1bmN0aW9uIHJlbGF0aW9uc2hpcHMoJGFjdGlvbikgew0KDQogICAgICAgICR0aGlzLT5pbkxvZygicmVsYXRpb25zaGlwcyIpOw0KDQogICAgICAgIC8qKg0KICAgICAgICAgKiAgICAgIGFjdGlvbnMgPSBmb2xsb3csIHVuZm9sbG93DQogICAgICAgICAqLw0KDQoNCiAgICAgICAgJGFjdGlvbnMgPSBbImZvbGxvdyIsInVuZm9sbG93Il07DQoNCiAgICAgICAgaWYoIWlzc2V0KCRhY3Rpb24pIHx8ICFpbl9hcnJheSgkYWN0aW9uLCAkYWN0aW9ucykpIGRpZSgiTm8gYWN0aW9uIGZvciBmb2xsb3dlcnMiKTsNCiAgICAgICAgJGNvdW50ZXIgPSAwOw0KICAgICAgICANCiAgICAgICAgJHR5cGUgPSAoJGFjdGlvbiA9PSAiZm9sbG93IiA/ICJub3Rmb2xsb3dlZCIgOiAiZm9sbG93ZWQiKTsNCg0KICAgICAgICAkdXNlcnMgPSAkdGhpcy0+dXNlcnNXaXRoU3RhdHVzKCR0aGlzLT5saXN0LCAkdHlwZSk7DQoNCiAgICAgICAgJHRoaXMtPmluTG9nKCJUbyAiLiRhY3Rpb24uIjogIi5jb3VudCgkdXNlcnMpKTsNCg0KDQogICAgICAgIGZvcmVhY2goJHVzZXJzIGFzICR1c2VyKSB7DQogICAgICAgICAgICAkcmVxID0gJHRoaXMtPnBhcmVudC0+Rm9sbG93KCR1c2VyWydwayddLCAkYWN0aW9uID09ICJ1bmZvbGxvdyIgPyB0cnVlIDogZmFsc2UpOw0KICAgICAgICAgICAgaWYoJHJlcVsnc3RhdHVzJ10gPT0gJ29rJykgew0KICAgICAgICAgICAgICAgICR0aGlzLT5pbkxvZygiRG9uZTogIi4rKyRjb3VudGVyKTsNCiAgICAgICAgICAgICAgICBzbGVlcChyYW5kKDIsNikpOw0KICAgICAgICAgICAgfSBlbHNlaWYoJHJlcVsnbWVzc2FnZSddID09ICJTb3JyeSwgdG9vIG1hbnkgcmVxdWVzdHMuIFBsZWFzZSB0cnkgYWdhaW4gbGF0ZXIuIikgew0KICAgICAgICAgICAgICAgICR0aGlzLT5pbkxvZygiTGltaXQiKTsNCiAgICAgICAgICAgICAgICBzbGVlcChyYW5kKDIwMCwzMDApKTsNCiAgICAgICAgICAgIH0gZWxzZWlmKCRyZXFbJ3NwYW0nXSA9PSB0cnVlICYmICRyZXFbJ2ZlZWRiYWNrX3RpdGxlJ10gPT0gIllvdZJyZSBUZW1wb3JhcmlseSBCbG9ja2VkIikgew0KICAgICAgICAgICAgICAgIHByaW50X3IoJHJlcSk7DQogICAgICAgICAgICAgICAgZGllKCR0aGlzLT5pbkxvZygiYmFuIikpOw0KICAgICAgICAgICAgfSBlbHNlIHByaW50X3IoJH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X0VPTDsNCgkJfQ0KCQllY2hvICJhbnN3ZXIgPj4gIjsNCgkJJHZhbHVlID0gdHJpbShmZ2V0cyhTVERJTikpOw0KCX0NCglyZXR1cm4gJHZhbHVlLTE7DQp9DQo='));
Output for 5.6.28, 7.0.20 - 7.2.0
Enter username: Enter password: [20:39:25]: Auth cUrl required
Output for 7.0.6
Enter username: Enter password: [20:00:32]: Auth cUrl required
Output for 7.0.5
Enter username: Enter password: [08:19:46]: Auth cUrl required
Output for 7.0.4
Enter username: Enter password: [20:14:52]: Auth cUrl required
Output for 7.0.3
Enter username: Enter password: [21:37:01]: Auth cUrl required
Output for 7.0.2
Enter username: Enter password: [03:51:04]: Auth cUrl required
Output for 7.0.1
Enter username: Enter password: [07:06:46]: Auth cUrl required
Output for 7.0.0
Enter username: Enter password: [09:00:56]: Auth cUrl required
Output for 5.6.21
Enter username: Enter password: [15:09:04]: Auth cUrl required
Output for 5.6.20
Enter username: Enter password: [07:21:12]: Auth cUrl required
Output for 5.6.19
Enter username: Enter password: [04:28:05]: Auth cUrl required
Output for 5.6.18
Enter username: Enter password: [13:18:58]: Auth cUrl required
Output for 5.6.17
Enter username: Enter password: [00:53:17]: Auth cUrl required
Output for 5.6.16
Enter username: Enter password: [09:49:59]: Auth cUrl required
Output for 5.6.15
Enter username: Enter password: [10:39:22]: Auth cUrl required
Output for 5.6.14
Enter username: Enter password: [16:20:34]: Auth cUrl required
Output for 5.6.13
Enter username: Enter password: [17:00:58]: Auth cUrl required
Output for 5.6.12
Enter username: Enter password: [07:28:13]: Auth cUrl required
Output for 5.6.11
Enter username: Enter password: [13:53:07]: Auth cUrl required
Output for 5.6.10
Enter username: Enter password: [15:57:04]: Auth cUrl required
Output for 5.6.9
Enter username: Enter password: [21:05:41]: Auth cUrl required
Output for 5.6.8
Enter username: Enter password: [05:55:52]: Auth cUrl required
Output for 5.5.35
Enter username: Enter password: [00:10:05]: Auth cUrl required
Output for 5.5.34
Enter username: Enter password: [09:32:35]: Auth cUrl required
Output for 5.5.33
Enter username: Enter password: [07:21:30]: Auth cUrl required
Output for 5.5.32
Enter username: Enter password: [17:12:04]: Auth cUrl required
Output for 5.5.31
Enter username: Enter password: [03:59:06]: Auth cUrl required
Output for 5.5.30
Enter username: Enter password: [12:32:20]: Auth cUrl required
Output for 5.5.29
Enter username: Enter password: [07:19:05]: Auth cUrl required
Output for 5.5.28
Enter username: Enter password: [10:44:30]: Auth cUrl required
Output for 5.5.27
Enter username: Enter password: [12:26:46]: Auth cUrl required
Output for 5.5.26
Enter username: Enter password: [18:37:18]: Auth cUrl required
Output for 5.5.25
Enter username: Enter password: [02:01:12]: Auth cUrl required
Output for 5.5.24
Enter username: Enter password: [08:16:40]: Auth cUrl required
Output for 5.4.44 - 5.4.45
Enter username: Enter password: [20:39:27]: Auth cUrl required
Output for 5.4.42 - 5.4.43
Enter username: Enter password: [20:39:29]: Auth cUrl required
Output for 5.4.40 - 5.4.41
Enter username: Enter password: [20:39:30]: Auth cUrl required
Output for 5.4.37 - 5.4.39
Enter username: Enter password: [20:39:31]: Auth cUrl required
Output for 5.4.35 - 5.4.36
Enter username: Enter password: [20:39:32]: Auth cUrl required
Output for 5.4.31 - 5.4.34
Enter username: Enter password: [20:39:33]: Auth cUrl required
Output for 5.4.27 - 5.4.30
Enter username: Enter password: [20:39:34]: Auth cUrl required
Output for 5.4.23 - 5.4.26
Enter username: Enter password: [20:39:35]: Auth cUrl required
Output for 5.4.20 - 5.4.22
Enter username: Enter password: [20:39:36]: Auth cUrl required
Output for 5.4.17 - 5.4.19
Enter username: Enter password: [20:39:37]: Auth cUrl required
Output for 5.4.12 - 5.4.16
Enter username: Enter password: [20:39:38]: Auth cUrl required
Output for 5.4.10 - 5.4.11
Enter username: Enter password: [20:39:39]: Auth cUrl required
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/9YvLK(2) : eval()'d code on line 14
Process exited with code 255.