PHP

ภาษา PHP ที่เราใช้ทุกวันนี้เป็นการสร้าง interpreter โดยบริษัท Zend แม้จะมีคู่มือบอกว่าใช้งานอย่างไรแต่ก็ไม่มีสเปคชัดเจนให้ผู้ที่ต้องการนักพัฒนาคอมไพล์เลอร์ของตัวเองไปพัฒนาได้ ตอนนี้ทางเฟซบุ๊กจึงเข้ามาช่วยเขียนสเปคนี้ให้ด้วยตัวเอง และเวอร์ชั่นแรกก็ออกมาให้อ่านกันแล้ว

สเปคภาษานี้จะอิงกับ PHP 5.6 โดยปล่อยออกมาพร้อมกับชุดทดสอบความเข้ากันได้

การที่ภาษามีสเปคชัดเจน ทำให้การอิมพลีเมนต์มีได้หลากหลาย เช่นใน Python นั้นเราสามารถใช้นิยามภาษาไปสร้าง Jython ที่เข้ากันได้ (แม้ตัวโมดูลอาจจะเข้ากันไม่ได้ก็ตาม) หรือภาษา C/C++ ที่มีคอมไพล์เลอร์จากผู้ผลิตหลายรายให้เลือกใช้งาน

ตอนนี้ยังเป็นแค่ดราฟท์ แต่ก็สามารถเข้าไปอ่านสเปคและดาวน์โหลดชุดทดสอบได้ที่ GitHub

ที่มา - PHP.net

Hiring! บริษัทที่น่าสนใจ

Carmen Software company cover
Carmen Software
Hotel Financial Solutions
Next Innovation (Thailand) Co., Ltd. company cover
Next Innovation (Thailand) Co., Ltd.
We are web design with consulting & engineering services driven the future stronger and flexibility.
KKP Dime company cover
KKP Dime
KKP Dime บริษัทในเครือเกียรตินาคินภัทร
Kiatnakin Phatra Financial Group company cover
Kiatnakin Phatra Financial Group
Financial Service
Fastwork Technologies company cover
Fastwork Technologies
Fastwork.co เว็บไซต์ที่รวบรวม ฟรีแลนซ์ มืออาชีพจากหลากหลายสายงานไว้ในที่เดียวกัน
Thoughtworks Thailand company cover
Thoughtworks Thailand
Thoughtworks เป็นบริษัทที่ปรึกษาด้านเทคโนโยลีระดับโลกที่คว้า Great Place to Work 3 ปีซ้อน
Iron Software company cover
Iron Software
Iron Software is an American company providing a suite of .NET libraries by engineer for engineers.
CLEVERSE company cover
CLEVERSE
Cleverse is a Venture Builder. Our team builds several tech companies.
Nipa Cloud company cover
Nipa Cloud
#1 OpenStack cloud provider in Thailand with our own data center and software platform.
Bangmod Enterprise company cover
Bangmod Enterprise
The leader in Cloud Server and Hosting in Thailand.
CIMB THAI Bank company cover
CIMB THAI Bank
MOVING FORWARD WITH YOU - CIMB is the leading ASEAN Bank
Bangkok Bank company cover
Bangkok Bank
Bangkok Bank is one of Southeast Asia's largest regional banks, a market leader in business banking
MuvMi (Urban Mobility Tech Co.,Ltd.) company cover
MuvMi (Urban Mobility Tech Co.,Ltd.)
Shape the future of urban mobility towards affordable, clean, and safe solutions
T.N. Digital Solution Co., Ltd. company cover
T.N. Digital Solution Co., Ltd.
TNDS has been involving in every first move of banking’s major digital transformation.
KBTG - KASIKORN Business-Technology Group company cover
KBTG - KASIKORN Business-Technology Group
KBTG - "The Technology Company for Digital Business Innovation"
Siam Commercial Bank Public Company Limited company cover
Siam Commercial Bank Public Company Limited
"Let's start a brighter career future together"
Icon Framework co.,Ltd. company cover
Icon Framework co.,Ltd.
Global Standard Platform for Real Estate แพลตฟอร์มสำหรับธุรกิจอสังหาริมทรัพย์ครบวงจร มาตรฐานระดับโลก
REFINITIV company cover
REFINITIV
The Financial and Risk business of Thomson Reuters is now Refinitiv
H LAB company cover
H LAB
Re-engineering healthcare systems through intelligent platforms and system design.
The Gang Technology Co., Ltd. company cover
The Gang Technology Co., Ltd.
We're a Digital Agency that helps our customers transform their business into digital with ease.
LTMH company cover
LTMH
LTMH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
Seven Peaks company cover
Seven Peaks
We Drive Digital Transformation
Wisesight (Thailand) Co., Ltd. company cover
Wisesight (Thailand) Co., Ltd.
The Best Choice For Handling Social Media · High Expertise in Social Data · Most Advanced and Secure
MOLOG Tech company cover
MOLOG Tech
We are Modern Logistic Platform, Specialize in WMS, OMS and TMS.
Data Wow Co.,Ltd company cover
Data Wow Co.,Ltd
We enable our clients to realize increased productivity by solving their most complex issues by Data
LINE Company Thailand company cover
LINE Company Thailand
LINE, the world's hottest mobile messaging platform, offers free text and voice messaging + Call
LINE MAN Wongnai company cover
LINE MAN Wongnai
Join our journey to becoming No.1 food platform in Thailand

icez Fri, 01/08/2014 - 13:09

Facebook has dedicated all copyright to this specification to the public domain worldwide under the CC0 Public Domain Dedication located at http://creativecommons.org/publicdomain/zero/1.0/. This specification is distributed without any warranty.

กราบ _/\_

สอบถามหน่อยครับ ผมทราบจากหลายๆ ที่ว่า FB ใช้ PHP เป็นหลัก
แล้วอะไรคือจุดเด่นของ FB ที่ใช้ PHP มากกว่าเว็บไซต์อื่นๆ รึครับ ?

ประมาณนั้นครับ
หรืออาจจะเปลี่ยนคำถามเป็นว่า ทำไมถึงได้สิทธิ์เข้ามามีส่วนร่วมในการเขียนสเปคน่ะครับ

น่าจะเป็นเพราะด้านความพร้อม และความพยายาม รวมถึงการพัฒนาที่ FB ต้องทำอยู่ตลอดครับ ตัว FB เองได้เอา Open Source หลายๆ ตัวมาพัฒนาในแบบของตัวเองมานานหลายปี เช่น MySQL (https://www.facebook.com/MySQLatFacebook), Memcache (https://www.facebook.com/MemcacheAtFacebook) ส่วนตัว PHP เคยได้ยินข่าวว่าเขียน Library บางตัวเองเพื่อเร่งประสิทธิภาพการทำงานของเว็บด้วยครับ ^^

มันไม่มีใครต้องให้สิทธิ์ใครครับ

PHP เป็นโครงการโอเพนซอร์สมันก็มีพฤติกรรมของมันอยู่แล้วว่ามันทำงานอย่างไร ใครจะเขียนคอมไพล์เลอร์ใหม่ให้ทำงานเหมือนกันก็ทำได้อยู่แล้ว

แต่ที่ทำก่อนหน้านี้คือต้องไปแกะจากพฤติกรรมตัว PHP Interpreter กันเอง ว่ารันคำสั่งไหนแล้วเป็นอย่างไร ตอนนี้ก็มีคนมาเขียนให้ ในแง่ของ PHP ตัวโครงการหลักไม่มีอะไรเปลี่ยน นอกจากว่ามีคนมาเขียน testcase ให้ ถ้าผมอยากเขียน php interpreter ใหม่แทนที่จะต้องไปแกะโค้ด ตอนนี้ก็เขียนตามสเปคนี้อย่างเดียว

PHP เองมีปัญหาไม่ backward compatible อยู่เรื่อยๆ (app ที่เขียนกับ php รุ่นเก่ากว่าไปใช้รุ่นใหม่ไม่ได้) หากทาง PHP ยอมรับสเปคที่เขียนนี้อนาคตอาจจะทดสอบกับชุดทดสอบพวกนี้ก่อนที่จะออกรุ่นต่อไป (แต่ถ้าไม่ยอมรับก็ไม่มีใครไปบังคับ)

FB เกิดในปี 2004 ตอนนั้นภาษาสำหรับทำเว็บคงยังมีไม่มาก เท่าที่นึกออกก็มี PHP, JSP, ASP, Perl แล้วภาษาที่ใกล้เคียงภาษา C มากที่สุดก็น่าจะเป็น PHP ก็เลยถูกหยิบมาใช้ แล้วพัฒนาต่อยอดมาเรื่อยๆ

FB ไม่ได้ใช้ PHP เพียวๆ ในการทำ ส่วนของ Backend ยังมี C++, Python, Erlang ... etc มาช่วยอีก