Fatal error: Cannot override final method Thread::synchronized() #74

Closed
olekukonko opened this Issue Mar 19, 2013 · 2 comments

Projects

None yet

2 participants

@olekukonko
Contributor

Example Code : Scope

https://github.com/krakjoe/pthreads/blob/master/examples/Scope.php

    protected function synchronized($arg = null){
        printf("IN->%s: %s\n", __METHOD__, microtime(true));
        if ($arg)
            $result = sprintf("%s: got \"%s\"", __METHOD__, $arg);
        else $result = sprintf("%s: got nothing", __METHOD__);
        printf("%s: %s\n", __METHOD__, microtime(true));
        usleep(1000000);
        printf("OUT->%s: %s\n", __METHOD__, microtime(true));
        return $result;
    }

Generates

Fatal error: Cannot override final method Thread::synchronized()

@krakjoe krakjoe added a commit that closed this issue Mar 19, 2013
@krakjoe fix #74
fix #74
24ab3fc
@krakjoe krakjoe closed this in 24ab3fc Mar 19, 2013
@olekukonko
Contributor

Same Error exists in the example in PHP DOC http://www.php.net/manual/en/pthreads.modifiers.php

@krakjoe krakjoe added a commit that referenced this issue Apr 3, 2013
@krakjoe correction #74 ea34dcb
@krakjoe
Owner
krakjoe commented Apr 3, 2013

well spotted, fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment