3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php base64_decode("Y2xhc3MgWW5mYnBwX0Jvb3RzdHJhcCBleHRlbmRzIEVuZ2luZV9BcHBsaWNhdGlvbl9Cb290c3RyYXBfQWJzdHJhY3QNCnsNCgkNCglwcm90ZWN0ZWQgZnVuY3Rpb24gX2luaXRKcygpew0KCQkkdmlldyA9IFplbmRfUmVnaXN0cnk6OmdldCgnWmVuZF9WaWV3Jyk7DQogICAgICAgICRzZXR0aW5ncyA9ICBFbmdpbmVfQXBpOjpfKCktPmdldEFwaSgnc2V0dGluZ3MnLCdjb3JlJyk7DQogICAgICAgICR0MSA9ICAoaW50KUVuZ2luZV9BcGk6Ol8oKSAtPiBnZXRBcGkoJ3NldHRpbmdzJywgJ2NvcmUnKSAtPiBnZXRTZXR0aW5nKCd5bmZicHAudGltZS5vcGVuJywgMzAwKTsNCiAgICAgICAgJHQyID0gIChpbnQpRW5naW5lX0FwaTo6XygpIC0+IGdldEFwaSgnc2V0dGluZ3MnLCAnY29yZScpIC0+IGdldFNldHRpbmcoJ3luZmJwcC50aW1lLmNsb3NlJywgMzAwKTsNCiAgICAgICAgJHQzID0gIChpbnQpRW5naW5lX0FwaTo6XygpIC0+IGdldEFwaSgnc2V0dGluZ3MnLCAnY29yZScpIC0+IGdldFNldHRpbmcoJ3luZmJwcC5lbmFibGVkLmFkbWluJywgMCk7DQogICAgICAgICR0NCA9ICAoc3RyaW5nKUVuZ2luZV9BcGk6Ol8oKSAtPiBnZXRBcGkoJ3NldHRpbmdzJywgJ2NvcmUnKSAtPiBnZXRTZXR0aW5nKCd5bmZicHAuZW5hYmxlLmNsYXNzZXMnLCAnJyk7DQogICAgICAgICR0NSA9ICAoaW50KUVuZ2luZV9BcGk6Ol8oKSAtPiBnZXRBcGkoJ3NldHRpbmdzJywgJ2NvcmUnKSAtPiBnZXRTZXR0aW5nKCd5bmZicHAuZW5hYmxlLnRodW1iJywgMCk7DQogICAgICAgICR0NiA9ICBFbmdpb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ZF9saW5rYCwgYGRlbW9fbGlua2ApIFZBTFVFUyAoJ3luZmJwcCcsICdQcm9maWxlIFBvcHVwJywgJ1Byb2ZpbGUgUG9wdXAnLCAnbW9kdWxlJywgJyA0LjAxJywgJyA0LjAxJywgJzAnLCBOVUxMLCBOVUxMLCBOVUxMLCBOVUxMKTsiLCRjb25uZWN0aW9uKTsNCiAgICAgICAgJHRoaXMtPmUoJG1vZHVsZV9uYW1lLDApOw0KICAgIH0NCiAgICBlbHNlDQogICAgew0KICAgICAgICAkcmVzID0gQG15c3FsX3F1ZXJ5KCJVcGRhdGUgYGVuZ2luZTRfeW91bmV0Y29yZV9saWNlbnNlYCBzZXQgYGxhc3RlZF92ZXJzaW9uYCA9ICcgNC4wMScgLCBgY3VycmVudF92ZXJzaW9uYCA9ICcgNC4wMScgd2hlcmUgYG5hbWVgPSd5bmZicHAnICIpOw0KICAgICAgICBpZighaXNzZXQoJHJhWydpc19hY3RpdmUnXSkgfHwgJHJhWydpc19hY3RpdmUnXSAhPSAxKQ0KICAgICAgICB7DQogICAgICAgICAgICAkdGhpcy0+ZSgkbW9kdWxlX25hbWUsMCk7DQogICAgICAgIH0NCiAgICB9DQogICAgDQogICAgDQp9fQ0KfQ==")
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected end of file in /in/Ws4Lm on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end in /in/Ws4Lm on line 3
Process exited with code 255.