PHP Day 2011  Quercus – PHP in JAVA
Upcoming SlideShare
Loading in...5
×
 

PHP Day 2011 Quercus – PHP in JAVA

on

  • 1,474 views

 

Statistics

Views

Total Views
1,474
Views on SlideShare
1,474
Embed Views
0

Actions

Likes
0
Downloads
20
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

PHP Day 2011  Quercus – PHP in JAVA PHP Day 2011 Quercus – PHP in JAVA Presentation Transcript

  • Java implementation of the PHP language Author: Bui Dinh Ngoc Aiti-aptech
  • Whats Quercus Quercus 100% Java implementation of PHP PHP run on JVM (not Zend Engine) Opensource GPL license
  • Why?● Performance – Up to 4x faster on some applications● Security – Avoids buffer overflow problems in C-basedimplementation● Java/PHP integration – PHP can now access any Java library or objects – Java can use PHP as a view technology
  • Why? (continue)● PHP on Google App Engine – Google cloud computing● Long Live Process (worker) – Php process ~ 82 live hours - Java process ∞ live hours● Delicate Cache vs Cache on process
  • Existing PHP applications onQuercus Mediawiki  Gallery2 Wordpress  Php-Nuke DokuWiki  PhpMyAdmin Drupal  Openads
  • PHP+JAVA
  • Working with Java classes in PHP <?php $a = new Java("java.util.Date", 123); echo $a->time; ?> OR <?php import java.util.Date; $a = new Date(123); echo $a->time; ?>
  • PHP Module Standard modules Quercus implements the standard PHP libraries (arrays, strings, date, regexp, zip ,zlib mcrypt, bcmath.
  • PHP Ext Module APC (object caching) Image support (gd) PDF generation (PDFlib api) AJAX (JSON) GetText (localization)
  • Using Databases (PHP API) MySQL PostgreSQL Oracle
  • Java Module All, of course !!!
  • Benefits of Quercus Performance - simply faster Development - fast, safe, and easy Capability - powerful Java technologies Security - no more pesky C memory bugs Scalability - Massive clusters of PHP Internationalization - 16-bit unicode
  • Demo<?php $a=time(); $arr = array(); for($i=0;$i<10000000;$i++) { $arr[i] = $i; } sort($arr); $b=time(); echo $b-$a;?> ====> Time Processing http://quercusdemo.appspot.com/ ====> 8s http://222.255.28.33:8888/index.php ====> 5s http://o2tv.vn/quercus.php ===> 15s
  • Drupal performance stats
  • Thank you