Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8748441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:31:33+00:00 2026-06-13T12:31:33+00:00

I have a data that came from a session and I want to parse

  • 0

I have a data that came from a session and I want to parse base on regex. Below are the 3 data that I want to get login, firstName and lastName.

login = James 
firstName = James.S 
lastName = Steal


Array (
[user] => __PHP_Incomplete_Class Object (
    [__PHP_Incomplete_Class_Name] => DEX_User
    [permissionID:DE_User:private] => 9
    [login:DE_User:private] => James.S
    [email:DE_User:private] => james.s@domain.com
    [firstName:DE_User:private] => James
    [lastName:DE_User:private] => Steal
    [title:DE_User:private] => Warehouse Man
    [manager:DE_User:private] => Manager's Name
    [workPhone:DE_User:private] => +1 (111) 111-1111
    [mobilePhone:DE_User:private] => +1 (222) 222-2222
    [homePhone:DE_User:private] => +1 (333) 333-3333
    [im:DE_User:private] =>
    [timeDelta:DE_User:private] => Asia/Hongkong
    [lastLogin:DE_User:private] => __PHP_Incomplete_Class Object ( 
        [__PHP_Incomplete_Class_Name] => GB_Date
        [valueStored:protected] => 13545544126666309821
        [mode:protected] => BASE
        [master:protected] =>
    )
    [description:DE_User:private] => Warehouse Engineer
    [isActive:DE_User:private] => __PHP_Incomplete_Class Object (
        [__PHP_Incomplete_Class_Name] => GB_Boolean
        [valueStored:protected] => 1
        [mode:protected] => BASE
        [master:protected] =>
    )
    [isTerminate:DE_User:private] => __PHP_Incomplete_Class Object (
        [__PHP_Incomplete_Class_Name] => GB_Boolean
        [valueStored:protected] =>
        [mode:protected] => BASE
        [master:protected] =>
    )
    [id:protected] => 231968
    [isModifyed:protected] => 
    [needInsert:protected] => 
    [isDeleted] => 
    [isRemoved] => 
)
[enter_password] => 2asas(qwqw)

I tried to perform regexp '/\[[\/]?[A-Za-z0-9]+\]/'; but i can only get that inside the bracket.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:31:34+00:00Added an answer on June 13, 2026 at 12:31 pm

    Instead of parsing it using RegExp you may evaluate it.

    Take a look at var_export($_SESSION['user']); . This returns a parseable string, the only problem you will see there is :

    __PHP_Incomplete_Class::__set_state
    

    “__PHP_Incomplete_Class” means, the class was unknown when the Session was started, the string still can’t be parsed.

    But you can take the string returned by var_export($_SESSION['user'],true) , replace the occurences of __PHP_Incomplete_Class::__set_state with array and the string can be evaluated:

    eval('$user='.str_replace('__PHP_Incomplete_Class::__set_state',
                              'array',
                              var_export($_SESSION['user'],true)).';');
    
    echo $user[0]['login'].',<br/>'.
         $user[0]['firstName'].',<br/>'.
         $user[0]['lastName'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have model data that came from a MultipleChoiceField. I have figured out it
I have a data that looks like this . And my code below simply
From my experience I have learn that using an surrogate INT data type column
I have this situation where I need to get some data from a webpage
I have a winform application that uses some referenced web services to get data.
I have a table in SQL Server with an entry that came from: INSERT
I have to read two .dbf files that came from a VFP server in
I have NSData that I'm loading from a filePath. The data is then getting
I have data that is organized in kind of a key-key format, rather than
I have data that looks like this: #info #info2 1:SRX004541 Submitter: UT-MGS, UT-MGS Study:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.