<?php class FooBar { public function foo() { goto anythingIWantToWrite; echo 'I am skipped'; anythingIWantToWrite: // this doesn't throw an error? return "foo"; } public function baz() { goto baz; echo 'I am skipped'; baz: 'foobar'; // this doesn't throw an error? return "bar"; } } $class = new FooBar(); echo $class->foo()."\n"; echo $class->baz();
You have javascript disabled. You will not be able to edit any code.