Suggested approach for missing functions

Discussion about the open-source Phalanger [?] project.

Suggested approach for missing functions

Postby weirdan » January 11th, 2016, 1:13 am

What kind of approach you would suggest to implement missing functions (like some of the functions from (stream?_)socket_* family)? I would like to keep part of the codebase compatible with php.

Variants I thought of:
  1. Implementing missing functions as a library. Would compatibility with existing functions like stream_socket_server (in PhpNetClassLibrary) be a problem? It seems linking a library providing implementation of a function already defined in PhpNetClassLibrary (with FunctionImplOptions.NotSupported) is, well, not supported :)
  2. Implementing a 'facade' interface and providing two implementation for it - one would be used where all functions are available (in vanilla php), and the other one would call in to .net sockets (probably bypassing Phalanger-provided socket functions as those don't seem to be fully developed yet).
  3. Implementing another backend for existing socket library. Socket libraries do not seem to be particularly popular in PHP world. Searching for 'php socket library' on github yields repositories with less than 10 forks in the top.
weirdan
 
Posts: 17
Joined: June 4th, 2013, 1:11 am

Re: Suggested approach for missing functions

Postby Jakub Misek » February 10th, 2016, 11:29 am

Missing functions should be implemented in PhpNetClasslibrary (https://github.com/DEVSENSE/Phalanger/t ... assLibrary) :-)

In this way compiler won't break and you will be notified during compile time, there is an unsupported function usage. Preferred is to implement the functions you need and share it with community :-)
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 24 guests

cron

User Control Panel

Login

Who is online

In total there are 24 users online :: 0 registered, 0 hidden and 24 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 24 guests