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

  • Home
  • SEARCH
  • 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 6882605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:16:28+00:00 2026-05-27T05:16:28+00:00

So I am working on a simple micro language/alternative syntax for PHP. Its syntax

  • 0

So I am working on a simple micro language/alternative syntax for PHP.
Its syntax takes a lot from JavaScript and CoffeeScript including a few of my own concepts. I have hand written the parser (no parser generator used) in PHP to convert the code into PHP then execute it. It is more of a proof of concept/learning tool rather than anything else but I’d be lying if I said I didn’t want to see it used on an actual project one day.

Anyway here is a little problem I have come across that I thought I would impose on you great intellects:

As you know in PHP the period ( . ) is used for string concatenation. However in JavaScript it is used for method chaining.

Now one thing that annoys me in PHP is having to do use that bloody arrow (->) for my method chains, so I went the JavaScript way and implemented the period (.) for use with objects.

(I think you can see the problem already)

Because I’m currently only writing a ‘dumb’ parser that merely does a huge search and replace, there is no way to distinguish whether a period (.) is being used for concatenation or for method chaining.

“So if you are trying to be like JavaScript, just use the addition (+) operator Franky!”, I hear you scream. Well I would but because the addition (+) operator is used for math in PHP I would merely be putting myself in the same situation.

Unless I can make my parser smart enough (with a crap load of work) to know that when the addition (+) operator is working with integers then don’t convert it into a period (.) for concatenation I am pretty much screwed.

But here is the cool thing. Because this is pretty much a new language. I don’t have to use the period or addition operator for concatenation.

So my question is: If I was to decide to introduce a new method of string concatenation, what character would make the most sense?

  • 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-05-27T05:16:29+00:00Added an answer on May 27, 2026 at 5:16 am

    Does it have to be one character? .. could work!

    Any myriad of combinations, like ~~ or >: even!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple working PHP script to write an HTML table from a
I'm looking for good/working/simple to use PHP code for parsing raw email into parts.
I'm working on a simple javascript login for a site, and have come up
I am working with a simple command line application that takes in ASCI text
I have a simple 'Working' form that runs on its own thread to keep
Working on a simple C program I'm stuck with an if test: int line_number
I'm working on a simple ASP.Net page (handler, actually) where I check the value
I'm working on a simple multiplayer game in which 2-4 players are placed at
I am working on a simple chat application using a System.Windows.Forms.WebBrowser Control to display
i am working on a simple web app which has a user model and

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.