PHP Implementations

PHPhttp://php.net/

PHPPHPhttps://github.com/ircmaxell/PHPPHP
A PHP VM implementation in PHP

HHVMhttp://hhvm.com/
HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP.

JPHPhttps://github.com/jphp-compiler/jphp
PHP Compiler for JVM

PH7http://ph7.symisc.net/
An Embedded Implementation of PHP (C Library)

Phalangerhttp://www.php-compiler.net/
PHP runtime & compiler for .NET/Mono

HippyVMhttp://hippyvm.com/
An implementation of the PHP language in RPython

KPHP (KittenPHP) – https://github.com/vk-com/kphp-kdb
VKontake PHP to C++ transformer

Roadsend PHP Compilerhttps://github.com/weyrick/roadsend-php

Roadsend PHP Ravenhttps://github.com/weyrick/roadsend-php-raven
Rewrite of the Roadsend PHP compiler in C++ using LLVM

php compilerhttp://www.phpcompiler.org/

LLVM Playgrounds:

Zend ByteCode to LLVM Compiler – https://github.com/preillyme/llvm
(started by Nuno Lopes, not finished)

https://gitorious.org/php-llvm

PHPUnit test error – headers already sent by phpunit.phar:2

While phpUnit-testing i got the following error:

Cannot modify header information - headers already sent by (output started at /usr/bin/phpunit.phar:2)

The solution is to redirect the phpunit output to the standard error output.

phpunit --stderr ...

Musical Note Symbol as List Bullets

How to use Unicodes for Music Note Symbols as List Bullets?

Ok, here we go. Firstly, select your desired Musical Note Symbol:

2669 = ♩
266A = ♪
266B = ♫
266C = ♬
266D = ♭
266E = ♮
266F = ♯

Secondly, add the musical note symbol as content to a li:before tag.
Instead of adding the symbol directly, you might try escaping the Unicode (“/2669″).
Thirdly, remove the default bullets by applying “list-style-type: none;” to the li tag.
Done!

p5rn7vb

Marry Netbeans and SQLite

How to add a SQLite driver as a Database Service into Netbeans for accessing SQLite database files?

  1. You will need a SQLite driver.  I suggest to use  the one from https://bitbucket.org/xerial/sqlite-jdbc
  2. Direct Download: https://bitbucket.org/xerial/sqlite-jdbc/downloads/sqlite-jdbc-3.7.2.jar
  3. Start Netbeans
  4. Open the Services Window via Menu: Window -> Services (or just Ctrl+5)
  5. Expand the “Databases” node and right-click on “Drivers”.
  6. The dialog “New JDBC Driver” appears.  Click “Add…” and in the  “Select Driver” dialog, select the downloaded driver file.
  7. Click Find to scan for the proper class name.  Now  “org.sqlite.JDBC” should appear in the Driver Class text field.
  8. Give this driver a name field like “SQLite Driver”
  9. Expand the Drivers node, and you should see the SQlite entry
  10. Done!

Next question:

How do i access a SQLite database file with this thingy?

  1. Expand the Drivers node, right-click on “SQLite Driver”.
  2. Click “New Connection..”.
  3. The “New Connection Wizard” dialog appears.
  4. Specify a JDBC URL to your SQLite file, like so jdbc:sqlite://C:/folder-where-your-database-file-resides/sampledb.sqlite
  5. Done!

 

PHP HHVM CLI OPTIONS

I’m tired of typing “help”…

 

HipHop VM v2.1.0-dev (rel)

Usage:

hhvm [-m <mode>] [<options>] [<arg1>] [<arg2>]

Options:

–help display this message

–version display version number

–compiler-id display the git hash for the compiler id

–repo-schema display the repo schema id used by this app

-m [ --mode ] arg (=run) run | debug (d) | server (s) | daemon | replay | translate (t)

-c [ --config ] arg load specified config file

-v [ --config-value ] arg individual configuration string in a format of name=value, where name can be any valid configuration for a config file

-p [ --port ] arg (=-1) start an HTTP server at specified port

–port-fd arg (=-1) use specified fd instead of creating a socket

–ssl-port-fd arg (=-1) use specified fd for SSL instead of creating a socket

–admin-port arg (=-1) start admin listener at specified port

-h [ --debug-host ] arg connect to debugger server at specified address

–debug-port arg (=-1) connect to debugger server at specified port

–debug-extension arg PHP file that extends y command

–debug-cmd arg executes this debugger command and returns its output in stdout

–debug-sandbox arg (=default) initial sandbox to attach to when debugger is started

-u [ --user ] arg run server under this user account

-f [ --file ] arg executing specified file

-l [ --lint ] arg lint specified file

-w [ --show ] arg output specified file and do nothing else

–parse arg parse specified file and dump the AST

–temp-file file specified is temporary and removed after execution

–count arg (=1) how many times to repeat execution

–no-safe-access-check arg (=0) whether to ignore safe file access check

–arg arg arguments

–extra-header arg extra-header to add to log lines

–build-id arg unique identifier of compiled server code

–xhprof-flags arg (=0) Set XHProf flags

Next Page →