SlideShare a Scribd company logo
1 of 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…?

More Related Content

More from Robert Nicholson

IBM Hybrid Integration Platform
IBM Hybrid Integration PlatformIBM Hybrid Integration Platform
IBM Hybrid Integration PlatformRobert Nicholson
 
IBM Interconnect 2016 - Hybrid Cloud Messaging
IBM Interconnect 2016 - Hybrid Cloud MessagingIBM Interconnect 2016 - Hybrid Cloud Messaging
IBM Interconnect 2016 - Hybrid Cloud MessagingRobert Nicholson
 
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 CoastRobert Nicholson
 
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 AME4181Robert Nicholson
 
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 AME4182Robert Nicholson
 
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 AME4183Robert 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 2014Robert Nicholson
 
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 BluemixRobert Nicholson
 
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...Robert Nicholson
 
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 ...Robert Nicholson
 
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...Robert Nicholson
 

More from 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...
 

Recently uploaded

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
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 educationjfdjdjcjdnsjd
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

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.