3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // class MyException extends Exception // { // public static $myErrLvls = array( // 1 => "E_ERROR", // 2 => "E_WARNING", // 4 => "E_PARSE", // 8 => "E_NOTICE", // 16 => "E_CORE_ERROR", // 32 => "E_CORE_WARNING", // 64 => "E_COMPILE_ERROR", // 128 => "E_COMPILE_WARNING", // 256 => "E_USER_ERROR", // 512 => "E_USER_WARNING", // 1024 => "E_USER_NOTICE", // 2048 => "E_STRICT", // 4096 => "E_RECOVERABLE_ERROR", // 8192 => "E_DEPRECATED", // 16384 => "E_USER_DEPRECATED", // 32767 => "E_ALL", // ); // private $myMsg; // private $myCode; // public function __construct($message, $code = 0, Exception $previous = null) { // $this->myMsg = $message; // $this->myCode = $code; // parent::__construct($message, $code, $previous); // } // public function __toString() { // return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; // } // public function getErrorArray() { // return array( // 'errLvl' => self::$myErrLvls[$this->myCode], // 'errNo' => $this->myCode, // 'errMsg' => $this->myMsg, // ); // } // } class Odometer { public function __construct(array $values, $max_places = 0){ $this->values = array_values($values); $this->max_places = $max_places; reset($values); $this->register[0] = key($values); end($values); $this->limit = key($values); } public function iterate($force = false){ $rollback = $this->register; $this->register[0]++; var_dump($regsiter); for($i = 0; $i < count($this->register); $i++){ if($this->register[$i] > $this->limit){ $this->register[$i] = 0; if(isset($this->register[$i+1])){ $this->register[$i+1]++; } else { if($this->max_places && count($this->register)+1 > $this->max_places && !$force){ $this->register = $rollback; return; } $this->register[$i+1] = 0; } } } } public function readMeter(){ for($i = 0; $i < count($this->register); $i++){ $meter[$i] = $this->values[$this->register[$i]]; } return $meter; } public function printMeter(){ // $this->setMeter(); return '[' . implode('][', array_reverse($this->readMeter())) . ']' . "\n"; } } $output = array(); $func = 'sqlite_open'; $empty = array( // -1 for no argument "''" => '', "\"\"" => "", "\"\"" => "\n", "' '" => ' ', "0" => 0, "0.0" => 0.0, "NULL" => NULL, "\\0" => "\0", "array()" => array(), "false" => false, "new stdClass()" => new stdClass(), ); // $refl = new ReflectionFunction($func); // $totalNumOfArgs = $refl->getNumberOfParameters(); $o = new Odometer($empty, 2); for($i = 0; $i < 50; $i++){ $o->iterate(); // var_dump($o->readMeter()); } // for($i = -1; $i < count($empty); $i++){ // // $args = isset($empty[$i]) ? array($empty[$i]) : array(); // if(isset($empty[$i])){ // if($i == 0){ $args = array($o->readMeter()); } // else if($i > 0){ $o->iterate(); $args = array($o->readMeter()); } // else { $args = array(); } // } // // try { // // $result = call_user_func_array('sqlite_open', $args); // // $output[$func][$i] = array( // // 'args' => $args, // // 'result' => $result, // // 'result_type' => gettype($result), // // ); // // } catch (MyException $e){ // // $output[$func][$i]['error'] = array( // // $e->getErrorArray(), // // ); // // } // var_dump($args); // }
based on kTEBp
Output for 5.1.1 - 5.6.30, 7.0.0 - 7.3.0rc4
Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL
Output for hhvm-3.22.0
Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line -1 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
Output for hhvm-3.10.1 - 3.21.3
Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL Notice: Undefined variable: regsiter in /in/VjrZZ on line 63 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/VjrZZ on line 142
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in /in/VjrZZ on line 49
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/VjrZZ on line 49
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/VjrZZ on line 49
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/VjrZZ on line 49
Process exited with code 255.