SlideShare uma empresa Scribd logo
1 de 15
P8, IBM’s PHP on Java Virtual Machine TM  Project Rob Nicholson [email_address]
Why Build PHP on the JVM? ,[object Object],[object Object],[object Object],[object Object],[object Object],TIOBE Programming Community Index (Sep 2008) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is PHP? ,[object Object],[object Object],[object Object],[object Object],Apache  HTTP  server Zend Engine Virtual Machine C Extensions Scripts Modules Frameworks Applications Databases ,[object Object],[object Object],[object Object],[object Object],[object Object]
What is P8?   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],P8 Runtime PHP Scripts CLI SAPI-J PZ  Http  Parser Interpreter/Compiler Runtime PHP Engine Java  Extensions C Extensions Cache IR XAPI-J XAPI-C Native  code Debug (DBGp)
How applications are supported. Zend Engine 2 ZE2 Extension interface file string pcre DOM App1 App2 App3 App4 PHP.net P8 file string pcre DOM App1 App2 App3 App4 XAPI-J todo XAPI-C todo ZE2 Extension interface sMash Apps depend on extensions which depend on ZE2 interfaces Array Array
PHP Characteristics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Typical PHP inc1.php: <?php  include “inc1.php”; $var=1; foo (“bar.php”,$var); include $var; ?> index.php: <?php function foo($a, &$b) {  $b=$a; } ?>
PHP Request Processing. Program state Request functions classes constants Global variables Objects Execute includes
Shared nothing architecture
Compiling PHP Functions. ,[object Object],public   class  Bytecode1_rob_php  extends  AbstractBytecode { public  PHPValue run(Runtime runtime) { // currently still fetching arguments interpreter style return null; } } ,[object Object],[object Object],[object Object]
Function Invoke w/o methodHandles <?php  function foo(){} foo(); bar(); ?> public   class  Bytecode1_rob_php  extends  AbstractBytecode { private   static  Invocable  invocable1 ; private  Invocable  invocable2; public  PHPValue run(Runtime runtime) { if ( invocable1  ==  null ) invocable1  = Op. jhGetInvocable (runtime,  “foo” ); Op. jhCALL ( null ,  invocable1 , runtime,  true ); // PHPValue returnVal = invocable1.bytecode.run(runtime); if ( invocable2  ==  null ) invocable2  = Op. jhGetInvocable (runtime,  “bar” ); Op. jhCALL ( null ,  invocable2 , runtime,  true ); // PHPValue returnVal = invocable2.bytecode.run(runtime ); return   null ; } }
JSR292 ,[object Object],[object Object],[object Object]
PHPValue ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Unicode PHP Engine Java  Extensions C Extensions XAPI-J XAPI-C j.l.S byte[] PHP String ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],BUT ,[object Object],[object Object],[object Object],SO
Questions…?

Mais conteúdo relacionado

Mais de Robert Nicholson

Mq light For Guide Share Europe 2014
Mq light For Guide Share Europe 2014Mq light For Guide Share Europe 2014
Mq light For Guide Share Europe 2014
Robert Nicholson
 

Mais de Robert Nicholson (12)

IBM Hybrid Integration Platform
IBM Hybrid Integration PlatformIBM Hybrid Integration Platform
IBM Hybrid Integration Platform
 
IBM Interconnect 2016 - Hybrid Cloud Messaging
IBM Interconnect 2016 - Hybrid Cloud MessagingIBM Interconnect 2016 - Hybrid Cloud Messaging
IBM Interconnect 2016 - Hybrid Cloud Messaging
 
Platform as a Service - CloudFoundry and IBM Bluemix - Developer South Coast
Platform as a Service - CloudFoundry and IBM Bluemix - Developer South CoastPlatform as a Service - CloudFoundry and IBM Bluemix - Developer South Coast
Platform as a Service - CloudFoundry and IBM Bluemix - Developer South Coast
 
Introducing MQ Light - IBM Interconnect 2015 session AME4181
Introducing MQ Light - IBM Interconnect 2015 session AME4181Introducing MQ Light - IBM Interconnect 2015 session AME4181
Introducing MQ Light - IBM Interconnect 2015 session AME4181
 
MQ Light in IBM MQ: IBM Interconnect 2015 session AME4182
MQ Light in IBM MQ:  IBM Interconnect 2015 session AME4182MQ Light in IBM MQ:  IBM Interconnect 2015 session AME4182
MQ Light in IBM MQ: IBM Interconnect 2015 session AME4182
 
MQ Light for Bluemix - IBM Interconnect 2015 session AME4183
MQ Light for Bluemix - IBM Interconnect 2015 session AME4183MQ Light for Bluemix - IBM Interconnect 2015 session AME4183
MQ Light for Bluemix - IBM Interconnect 2015 session AME4183
 
Mq light For Guide Share Europe 2014
Mq light For Guide Share Europe 2014Mq light For Guide Share Europe 2014
Mq light For Guide Share Europe 2014
 
MQ Light for WTU
 MQ Light for WTU MQ Light for WTU
MQ Light for WTU
 
Messaging in the Cloud with IBM MQ Light and IBM Bluemix
Messaging in the Cloud with IBM MQ Light and IBM BluemixMessaging in the Cloud with IBM MQ Light and IBM Bluemix
Messaging in the Cloud with IBM MQ Light and IBM Bluemix
 
Session 1897 messaging in the cloud with elastic mq mq light and bluemix-impa...
Session 1897 messaging in the cloud with elastic mq mq light and bluemix-impa...Session 1897 messaging in the cloud with elastic mq mq light and bluemix-impa...
Session 1897 messaging in the cloud with elastic mq mq light and bluemix-impa...
 
IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces ...
IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces ...IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces ...
IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces ...
 
IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP wi...
IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP wi...IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP wi...
IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP wi...
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

PHP Presentation to JVM Languages summit

  • 1. P8, IBM’s PHP on Java Virtual Machine TM Project Rob Nicholson [email_address]
  • 2.
  • 3.
  • 4.
  • 5. How applications are supported. Zend Engine 2 ZE2 Extension interface file string pcre DOM App1 App2 App3 App4 PHP.net P8 file string pcre DOM App1 App2 App3 App4 XAPI-J todo XAPI-C todo ZE2 Extension interface sMash Apps depend on extensions which depend on ZE2 interfaces Array Array
  • 6.
  • 7. Typical PHP inc1.php: <?php include “inc1.php”; $var=1; foo (“bar.php”,$var); include $var; ?> index.php: <?php function foo($a, &$b) { $b=$a; } ?>
  • 8. PHP Request Processing. Program state Request functions classes constants Global variables Objects Execute includes
  • 10.
  • 11. Function Invoke w/o methodHandles <?php function foo(){} foo(); bar(); ?> public class Bytecode1_rob_php extends AbstractBytecode { private static Invocable invocable1 ; private Invocable invocable2; public PHPValue run(Runtime runtime) { if ( invocable1 == null ) invocable1 = Op. jhGetInvocable (runtime, “foo” ); Op. jhCALL ( null , invocable1 , runtime, true ); // PHPValue returnVal = invocable1.bytecode.run(runtime); if ( invocable2 == null ) invocable2 = Op. jhGetInvocable (runtime, “bar” ); Op. jhCALL ( null , invocable2 , runtime, true ); // PHPValue returnVal = invocable2.bytecode.run(runtime ); return null ; } }
  • 12.
  • 13.
  • 14.