Results 1 to 4 of 4

Thread: Use PHP functions in JavaScript

  1. #1
    ankit is offline Net Builder
    Join Date
    Mar 2009
    Location
    India
    Posts
    133
    Thanks
    25
    Thanked 17 Times in 14 Posts

    Use PHP functions in JavaScript

    Couldn't find any thread on this topic so creating one.

    Whereas some might be already using php.js here but most would be unaware of it I suppose so this is for those who are unaware of it.

    "PHP.JS is an open source project in which we try to port PHP functions to JavaScript"

    Those already aware of it or are using it please share your views on its functionality and security issues.

  2. #2
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    I like the idea of extending JavaScript, but wouldn't this require the support of every major browser manufacturer?

    JavaScript is mainly executed client-side. PHP is executed server-side. It sees to me that there is a lot of server-side code that you just can't port to the client. That's not a language issue, it's an architectural issue.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  3. #3
    ankit is offline Net Builder
    Join Date
    Mar 2009
    Location
    India
    Posts
    133
    Thanks
    25
    Thanked 17 Times in 14 Posts
    Quote Originally Posted by Will.Spencer View Post
    I like the idea of extending JavaScript, but wouldn't this require the support of every major browser manufacturer?

    JavaScript is mainly executed client-side. PHP is executed server-side. It sees to me that there is a lot of server-side code that you just can't port to the client. That's not a language issue, it's an architectural issue.
    yes, as the javascripts are executed client side thats why I was wondering about the security issues that may occur and most of the could obvoiusely cannot be executed client-side.

    But at the same time I suppose its pretty good for mini sites as it will help in much faster loading of pages similar to regular html pages.

  4. #4
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    I think the need to download the entire source code every time might actually slow down page loads?
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

Similar Threads

  1. Glittering administrative functions
    By ViDonaghuehkkf in forum Services
    Replies: 0
    Last Post: 1 February, 2011, 07:15 AM
  2. Need Help In JavaScript
    By Zash in forum Programming
    Replies: 1
    Last Post: 10 September, 2010, 19:08 PM
  3. Javascript
    By Sbfc_ in forum Community Building
    Replies: 5
    Last Post: 19 March, 2010, 01:21 AM
  4. PHP Form verification: preg or built in functions
    By DickTracy in forum Programming
    Replies: 4
    Last Post: 13 December, 2009, 09:46 AM
  5. Replies: 4
    Last Post: 13 November, 2009, 14:26 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •