PHP 5.3 namespace support is missing

Today I was trying Instant Reverse an source.
But it fails at the namespace charater in PHP 5.3 ‘’

PHP 5.2 is end of life, and namespaces are getting used more and more these days so I’m surprised VP-UML does not support this yet.
When will this be implemented?

Thank you for your message but it seems this is already fixed in our latest release. May I know what version and build number of the tool you are using? And can you try update to latest release and see is it working?

Best regards,
Rain

Sorry for the late reply.

Yes, it’s working now.

But not as good as possible, namespaces are parsed.
But not created with the source.

May I know what you mean by not created with the source? You mean not generated in source code?

Best regards,
Rain

"You mean not generated in source code? "
Yes :slight_smile:

Like:

namespace RF\Controller ;

And

class ClassA extends \RF\ClassB { }

And the same goes for PHP Doc which uses dots instead of backslash.

Confirm that. Latest version of SDE-EC, trial. Tried to instant reverse Zend Framework2:

Error occured when analysis: C:\workspace\ZendFramework2\library\Zend\Amf\Parser\Exception.php. Encountered “\” at line 5, column 29

File content:

<?php

namespace Zend\Amf\Parser;

interface Exception extends \Zend\Amf\Exception
{
}

Same problem here, any updates on this?

Hi all,

We have supported namespace in PHP Instant Reverse. Please run the VP Suite Update to update the software to latest build and have a try.

Best regards,
Jick Yeung

and another addition to my previous post, i have removed the line just for the instant reverse and the next line it errord out was this:

$content = <<<'CONTENT'

with the error:

Reason :
Error occured when analysis: E:\path\Finder.php. Lexical error at line 25, column 31.  Encountered: "\'" (39), after : ""

regards benjamin

hi,

just trying to help :), here is another snippet which stops execution of instant reverse:

class Zend_Filter_Boolean implements Zend_Filter_Interface
{
    const BOOLEAN      = 1;
    const INTEGER      = 2;
    const FLOAT        = 4;
    const STRING       = 8;
    const ZERO         = 16;
    const EMPTY_ARRAY  = 32;
    const NULL         = 64;
    const PHP          = 127;
    const FALSE_STRING = 128;
    const YES          = 256;
    const ALL          = 511;

here the reverse has a problem with the line “const NULL = 64”, which is valid php (although most IDEs will choke on the syntax highlighting here).

regards benjamin

Hi there,

so i updated to Version 8.3 (Build sp2_20120308) and tried to insta reverse a php project but it failed on this line:

class Composite implements \IteratorAggregate, \Countable

Error message is:

Reason :
Error occured when analysis: E:\path\Composite.php. Encountered “\” at line 16, column 48

regards benjamin

Hi user,

Thank you for your post. We are now studying the issues. When there is any news I will post again.

Best regards,
Jick Yeung

Five months later, php namespace reverse still not working. I have version 10.0, build 20120806. Any update?

i want php namespace!!!

Hi, I noticed that instant reverse has a problem with parsing multiple implements that use namespaces.
This class declaration generates an error on the first ‘, \TYPO3’

class FileBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend implements \TYPO3\CMS\Core\Cache\Backend\PhpCapableBackendInterface, \TYPO3\CMS\Core\Cache\Backend\FreezableBackendInterface, \TYPO3\CMS\Core\Cache\Backend\TaggableBackendInterface {
    [...]
}

Sorry about this issue and our engineers are checking about the multiple implements problem you experienced. I’ll keep you post once there are any update and please be patient.

Best regards,
Rain Wong

Hi, sorry for the delay. I would like to let you know the fail to reverse PHP source code with multiple implements which using namespace problem had been fixed in the latest version 10.2. Please update the software to latest patch build (20131120ba or later). Details about update to latest patch can be found at

  • Please make sure you have pressed the “Update to latest patch” button on the left hand side of the dialog right after launching the update program

Feel free to contact me if you require any further information.

Best regards,
Rain Wong

i have an error when i do the instant reverse, that said : error when analysis encountred “)” at line 55 column 29.
I checked the code source and i dont understand what this error is.
the code is functionnal.
i have the latest version of VP.
Please help.

best regards

I have also a problem with the trial version with php 5.4 code … to bad the tool looks great but I want a tool which support PHP5.4

I also fine answer of this question. Thanks for asked this question